FAQ
It worked. A silly mistake.

Thank you!
On Friday, May 6, 2016 at 2:46:04 PM UTC+3, Manlio Perillo wrote:

Il giorno venerdì 6 maggio 2016 12:17:08 UTC+2, Rayland ha scritto:
I've built a simple client that sends multiple messages and server that
reads in a loop but that will only print the first message and then does
nothing.

My purpose here is to send lots of messages on the same connection and I
am not interested in a response.
The client tries to read some data from the server, but the server does
not send anything.
Since there is only one client, the server waits forever for more data to
read.

P.S.:
The problem has nothing to do with TCP connection reusing.
When you use the same connection to do several requests, the only problem
you have is how to differentiate between the different requests.
You need to define a custom protocol; e.g.
https://en.wikipedia.org/wiki/Netstring


Manlio
--
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

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 5 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 6, '16 at 10:17a
activeMay 6, '16 at 6:48p
posts5
users2
websitegolang.org

2 users in discussion

Rayland: 3 posts Manlio Perillo: 2 posts

People

Translate

site design / logo © 2021 Grokbase