<div dir="ltr">Joseph,<div>if you're getting the messages being printed out in the command window, that's good because the messages are actually being received. The messages should be automatically placed in the text bufferwave you provide, always filling out the last row. SOCKIT was not specifically designed for request/response, it was designed for synchronous and asynchronous (i.e. your situation) communication. There may be an upper limit as to the volume of material it can process though.</div><div><br></div><div>1) It may be worth trying to use the example I gave because it showed that at the raw socket level the thing actually works, and that the message was going into a wave. Any communication via TCP sockets is just stuff coming in and out. Only when you get to a protocol (e.g. http) does it matter what order stuff happens in and what the messages are.</div><div>2) Make sure you haven't set the /NOID flag.</div><div>3) Try making the connection without the /PROC flag to start with. The messages should just pile up in the bufferwave. What precisely is the remote server sending? If it's binary instead of text then a table may not display them.</div><div>4) If step 3 works then try using a processor function. Make sure the procedures are compiled otherwise nothing will happen.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 29 Mar 2019 at 02:50, DiVerdi,Joseph <<a href="mailto:Joseph.DiVerdi@colostate.edu">Joseph.DiVerdi@colostate.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Andy,<br>
<br>
Thanks very much for the response. However, my situation is substantially different from the one that you describe. <br>
<br>
For starters I'm not using a HTTP server. My custom-made server acts differently than a typical HTTP server - once a connection is made the server continually emits \n terminated strings of data, several per second until the connection is severed. This is its design. It recovers gracefully from the connection closure and is then immediately ready for another connection. Its behavior is better visualized and tested using telnet with the server's IP address (it is on another machine on my LAN) and port number rather than a browser. I'm not really asking about the server this is a part of the project - it's pretty much settled.<br>
<br>
I am asking about SOCKIT especially about some particular behavior: When I open a socket with SOCKIT (I actually love writing that rather than a connection with SOCKIT) I immediately get the remote emitted messages printed (with vigor) in Igor's history. No surprise here. I can silence these messages using a Q flag on the open connection call. Good stuff again. However, I have not yet been able to capture those incoming messages in the textWave nor using the myPocessorFunc (both as you call it below and described in the SOCKIT docs).<br>
<br>
It looks to me that SOCKIT has been (specifically?) designed to model the request-response style of communication (ala HTTP client-server) and cannot handle a continuous emitter such as my server. Perhaps you (or someone else on the list) has experience with my particular problem and can speak with authority about SOCKIT's capabilities in this particular and somewhat different connection protocol.<br>
<br>
Thanks again for your response. It's ALWAYS good to hear from kindred spirits and from others fooling around with the same toys.<br>
<br>
Best regards,<br>
Joseph<br>
<br>
On Wed, 27 Mar 2019 9:53 PM, Andrew Nelson wrote:<br>
> This works for me on macOS.<br>
> 1) From a terminal window type "python -m http.server". THis will start a<br>
> webserver up, as it starts it'll tell you the IP and port number it will be<br>
> serving on. Open a web browser on this IP and port number. You should see a<br>
> list of files in the directory you started the server up in. In this<br>
> example I use the IP address 0.0.0.0 and port number 8000.<br>
> <br>
> 2) In Igor have this in your procedure file:<br>
> <br>
> Function myProcessorFunc(textWave, entry)<br>
> wave/t textWave // a reference to the bufferwave of interest<br>
> variable entry // which row has just been filled in the bufferwave.<br>
> // do something here<br>
> print textWave[entry][0]<br>
> print " received at"+ textWave[entry][1]<br>
> End<br>
> <br>
> 2) From IGOR type the following commands:<br>
> <br>
> variable socknum<br>
> make/t bufferwave<br>
> sockitopenconnection/proc=myprocessorFunc sockNum,"0.0.0.0",8000,bufferwave<br>
> sockitsendmsg sockNum,"GET /LOG16-10-27T120232_65.txt HTTP/1.1\r\n\r\n"<br>
> <br>
> <br>
> The GET command will return the contents of the file. In this case I was<br>
> looking at file "LOG16-10-27T120232_65.txt". I see the ****LAST**** entry<br>
> of bufferwave fill up and the contents of the file printed to the command<br>
> history.<br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<a href="http://lists.info-igor.org/private.cgi/info-igor-info-igor.org/attachments/20190328/cbec57f7/attachment.html" rel="noreferrer" target="_blank">http://lists.info-igor.org/private.cgi/info-igor-info-igor.org/attachments/20190328/cbec57f7/attachment.html</a>><br>
> _______________________________________________<br>
> Info-igor mailing list<br>
> <a href="mailto:Info-igor@lists.info-igor.org" target="_blank">Info-igor@lists.info-igor.org</a><br>
> <a href="http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org" rel="noreferrer" target="_blank">http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org</a><br>
> <br>
<br>
-- <br>
Joseph A. DiVerdi, Ph.D., M.B.A.<br>
Associate Professor of Chemistry<br>
Colorado State University, Fort Collins, CO, USA<br>
+1.970.980.5868 - <a href="http://sites.chem.colostate.edu/diverdi" rel="noreferrer" target="_blank">http://sites.chem.colostate.edu/diverdi</a><br>
<br>
_______________________________________________<br>
Info-igor mailing list<br>
<a href="mailto:Info-igor@lists.info-igor.org" target="_blank">Info-igor@lists.info-igor.org</a><br>
<a href="http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org" rel="noreferrer" target="_blank">http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">_____________________________________<br>Dr. Andrew Nelson<br><br><br>_____________________________________</div>