|
Where can one find NetRexx stream sockets examples?
Earl _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
|
Am 12.08.2012 17:01, schrieb Earl Hodil:
> Where can one find NetRexx stream sockets examples? I know The IBM Redbook Creating Java Applications Using NetRexx http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg242216.html?Open and The NetRexx Tutorial by Pierantonio Marchesini (see NetRexx.org -> Documents) has some examples hth kp _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
|
In reply to this post by Earl Hodil
Raw socket - sends command gets response
do -- ready to process say 'Connecting to server:' server '(port:' port')' mysocket = Socket(server, port) -- actual connect say 'Requesting:' str -- what we want say -- output: send out = PrintWriter(OutputStreamWriter(mysocket.getOutputStream())) -- input: receive in = BufferedReader(InputStreamReader(mysocket.getInputStream())) out.printLn(str) -- send our requeststring out.flush() -- needed on some platforms ! And the URL wrapper on a socket. This one downloads a zip file. method mammoth(urlName=Rexx) static signals MalformedURLException,FileNotFoundException,IOException urln=URL(urlName) outfilename = String "\\output.zip" outdata = DataOutputStream(FileOutputStream(outfilename)) in = BufferedInputStream(urln.openStream()) instream = DataInputStream(in) loop forever onebyte = instream.readByte() outdata.writeByte(onebyte) catch e=EOFException say e.getMessage() in.close() end outdata.close() return ________________________________________ From: [hidden email] [[hidden email]] on behalf of Earl Hodil [[hidden email]] Sent: Sunday, August 12, 2012 10:01 AM To: [hidden email] Subject: [Ibm-netrexx] NetRexx Socket Example Where can one find NetRexx stream sockets examples? Earl _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
|
In reply to this post by Earl Hodil
On 08/12/12 11:01, Earl Hodil wrote:
> Where can one find NetRexx stream sockets examples? > > Earl > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > > Have a look at XSOCK... Jerry _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
| Free forum by Nabble | Edit this page |
