Hi there.<div><br></div><div>You could take a look at the project description:</div><div><br></div><div><a href="https://www.wavemetrics.com/project/SOCKIT">https://www.wavemetrics.com/project/SOCKIT</a></div><div><br></div><div>In principlal, it allows you to communicate with network sockets. Take a look at unix socket introduction, if you are interested in this concept. I think, translated for audio people it refers to the problem when two programs want to simultaneously output audio to a hifi stereo system then you can either give them separate channels (one outputs right and one outputs left channel) Your services then are linarly independent to each other but that approach is not very practical. They can also share a common mixer which is the socket. The mixer now allows audio signals to pass through depending on which instance takes over the socket.</div><div><br></div><div>For http sockets, it is mostly communication for web services that is coordinated through these sockets. Say for example, you have a database but want to coordinate writes so that two instances don't change the same database object at the same time leading to a conflict.</div><div><br></div><div>In unix, sockets are a very basic concept that will remain over time so it is worth to take a look.</div><div><br></div><div>Regards,</div><div><br></div><div>Matthias (a nanoscience guy)<br><br>On Thu, Mar 28, 2019 at 6:12 PM, Don Keele <DKeeleJr@Comcast.net> wrote:<br>
<blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">Hi All,
Hey, I'm just an innocent ignorant observer here! What the heck is a SOCKIT
and what does it provide in an Igor program? I'm a simple, lowly, and
unsophisticated audio guy!

--
Best Regards,
Don Keele

D. B. (Don) Keele, Jr.
Chief Consultant and Owner
DBK Associates and Labs
6435 E. Wellston Dr.
Bloomington, IN 47408
Cell: (812) 219-3951
mailto: DKeeleJr@Comcast.net
Skype: donkeele
<a href="http://www.DBKeele.com/">http://www.DBKeele.com/</a>   




-----Original Message-----
From: Info-igor [<a href="mailto:info-igor-bounces@lists.info-igor.org">mailto:info-igor-bounces@lists.info-igor.org</a>] On Behalf Of
DiVerdi,Joseph
Sent: Thursday, March 28, 2019 11:50 AM
To: Igor Discussion List
Subject: Re: SOCKIT experimentation

Andy,

Thanks very much for the response. However, my situation is substantially
different from the one that you describe. 

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.

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).

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.

Thanks again for your response. It's ALWAYS good to hear from kindred
spirits and from others fooling around with the same toys.

Best regards,
Joseph

On Wed, 27 Mar 2019 9:53 PM, Andrew Nelson wrote:
<blockquote> This works for me on macOS.
 1) From a terminal window type "python -m http.server". THis will start a
 webserver up, as it starts it'll tell you the IP and port number it will
</blockquote>be
<blockquote> serving on. Open a web browser on this IP and port number. You should see
</blockquote>a
<blockquote> list of files in the directory you started the server up in. In this
 example I use the IP address 0.0.0.0 and port number 8000.
 
 2) In Igor have this in your procedure file:
 
 Function myProcessorFunc(textWave, entry)
     wave/t textWave // a reference to the bufferwave of interest
     variable entry // which row has just been filled in the bufferwave.
     // do something here
     print textWave[entry][0]
     print " received at"+ textWave[entry][1]
 End
 
 2) From IGOR type the following commands:
 
 variable socknum
 make/t bufferwave
 sockitopenconnection/proc=myprocessorFunc
</blockquote>sockNum,"0.0.0.0",8000,bufferwave
<blockquote> sockitsendmsg sockNum,"GET /LOG16-10-27T120232_65.txt HTTP/1.1\r\n\r\n"
 
 
 The GET command will return the contents of the file. In this case I was
 looking at file "LOG16-10-27T120232_65.txt". I see the ****LAST****  entry
 of bufferwave fill up and the contents of the file printed to the command
 history.
 -------------- next part --------------
 An HTML attachment was scrubbed...
 URL:
</blockquote><<a href="http://lists.info-igor.org/private.cgi/info-igor-info-igor.org/attachments/">http://lists.info-igor.org/private.cgi/info-igor-info-igor.org/attachments/</a>
20190328/cbec57f7/attachment.html>
<blockquote> _______________________________________________
 Info-igor mailing list
 <a href="mailto:Info-igor@lists.info-igor.org">Info-igor@lists.info-igor.org</a>
 <a href="http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org">http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org</a>
 
</blockquote>
<div>-- 
</div>Joseph A. DiVerdi, Ph.D., M.B.A.
Associate Professor of Chemistry
Colorado State University, Fort Collins, CO, USA
+1.970.980.5868 - <a href="http://sites.chem.colostate.edu/diverdi">http://sites.chem.colostate.edu/diverdi</a>

_______________________________________________
Info-igor mailing list
<a href="mailto:Info-igor@lists.info-igor.org">Info-igor@lists.info-igor.org</a>
<a href="http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org">http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org</a>

_______________________________________________
Info-igor mailing list
<a href="mailto:Info-igor@lists.info-igor.org">Info-igor@lists.info-igor.org</a>
<a href="http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org">http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org</a>

</div></blockquote></div>