hi there, I use golang in my app project as the main server language.
The server allow muti players to connect at the same time.
For one particular connection, I want to handle it's request in sequence
rather than parallelzation。It means one player's request will be handled
one by one.
Since the rpc.ServeCodec alaws fork a new goroutinue to handle the Request,
i use the rps.ServerRequest to replace it.

    As show below,after Accept a new connection, i fork a new goroutine to
handle it. Inside the handle goroutine func, one connection's request will
be process one by one.

    But i notice that not every err would close the connection in the
rpc.ServeCodec.How can i dicide which err is ok to close the conneciton?

You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
postedApr 19, '16 at 1:05p
activeApr 19, '16 at 1:05p

1 user in discussion

Zhongzhihao87: 1 post



site design / logo © 2022 Grokbase