Hi

On 1 June 2013 02:44, Andrew Spano <werdnaon...@gmail.com> wrote:

> Hello,
>
> I'm trying to create a very simple interaction between a client and server
> program using the server-socket library which used to be part of
> clojure-contrib and is now maintained by technomancy
> https://github.com/technomancy/server-socket/blob/master/src/server/socket.clj
>
>
> I created a simple echo server, which works fine when accessed by telnet
> but can't seem to accept messages from the python client.
>
[...]


> The only output the client displays is a single empty vector after which
> it waits to receive more data.  Since this works correctly when I access
> the port over telnet I can't figure out what the problem is.  As a novice
> to both clojure and socket programming my best guess is that it has
> something to do with multiple threading--I know that both python and
> clojure create a new thread for each distinct socket.
>

No, there is no threading involved here.  Neither Python, nor Clojure
create new threads for new sockets.

Some servers create new threads when accepting connections, but that has to
be explicitly programmed like that.  Other servers (although generally not
ones implemented in Java) instead spawn new processes to handle new
connections.  Others use a combination of both.  There are even others that
can handle multiple connections with only a single process and a single
thread by using select() or poll() etc.


> It's probably an incorrect guess. That's why I've decided to consult the
> community :D.  Any help is appreciated in advance!
>
>
-- 
Michael Wood <esiot...@gmail.com>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to