The snippet:
---
(def reschedule nil) ; Forward declaration
(defn broadcast [msg]
(reschedule)
(doall
(map
(fn [client]
(send-msg client msg))
@clients)))
---
(def
Ngo,
I checked out your github , it is great. I have not used netty, it looks
clean. However, what is the meaning of this, (def reshedule nil)?
Regards,
Emeka
On Thu, Oct 15, 2009 at 3:02 AM, ngocdaothanh wrote:
>
> I created this (Netty is used instead of server-socket):
> http://github.com/
I created this (Netty is used instead of server-socket):
http://github.com/ngocdaothanh/telchat-clojure
I am going to create a Scala version of the same program to have a
feeling of Clojure vs Scala, it will be telchat-scala.
On Oct 14, 10:12 pm, Emeka wrote:
> Ngo,
>
> Honestly speaking I do
Ngo,
Honestly speaking I don't know. How far have you gone?
Regards,
Emeka
On Sat, Oct 3, 2009 at 3:21 PM, ngocdaothanh wrote:
>
> Emeka, good catch. It's just my mistake.
>
> Another thing is I think there may be exception raised when on-msg
> sends message to a closed socket. How would you
Emeka, good catch. It's just my mistake.
Another thing is I think there may be exception raised when on-msg
sends message to a closed socket. How would you solve this?
On Oct 3, 7:35 pm, Emeka wrote:
> ngo,
> I was about doing this kind of client/server thing some days ago, however
> now you
ngo,
I was about doing this kind of client/server thing some days ago, however
now you are into it I would like to learn then. I am not quite clear why you
have this:
(.start (new Thread (fn [] (create-server 8080 chat-loop
My concern is on Thread, create-server function has a Thread inside
> I'm not sure TCP/IP has a native facility for that.
I'm afraid John's statement is correct:
http://www.velocityreviews.com/forums/t125620-client-socket-disconnection-event-not-received-on-server-socket-java-nio.html
and trying to read and write until something wrong happens as
demonstrated in R
On Thu, Oct 1, 2009 at 4:02 PM, Roger Gilliar wrote:
> Am 01.10.2009 um 21:28 schrieb ngocdaothanh:
> > Roger, your code is not event based.
> What do you mean by not event based ?
He means he wants automatic notification if a connection is dropped.
I'm not sure TCP/IP has a native facility fo
Am 01.10.2009 um 21:28 schrieb ngocdaothanh:
> Roger, your code is not event based.
What do you mean by not event based ?
Regards
Roger
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post t
Roger, your code is not event based.
I'm new to Clojure and as a small exercise I just want to create a
simple chat server for telnet clients, any usable socket library is
OK:
* Chat messages are broadcast to all clients
* When a client disconnect, all others will receive "A client has
disconnect
>
> I want to write a simple socket server in Clojure. I want to perform
> some action when a client disconnects.
---
The following code works for me. read-input returns nil if the socket
is closed (the client disconnects)
Regards
Roger
(defn read-inp
I want to write a simple socket server in Clojure. I want to perform
some action when a client disconnects.
I tried server-socket:
http://richhickey.github.com/clojure-contrib/server-socket-api.html
but it does not support on exit event.
Is there a solution? Should I look at something like Grizz
12 matches
Mail list logo