471,627 Members | 2,316 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

Opening and Closing Sockets

Hi,

I am writing an app that will have a socket server to listen for and process
data from 20+ clients. These clients will send data aproximately every
400-500ms.

I was wondering if it is possible when i have established a connection with
a client to keep that connection open rather than opening and closing every
400-500ms as i'd imagine there is overhead involved in this.

Is this possible?

Thanks In Advance
Macca
Feb 9 '06 #1
2 1566
Hi,

"Macca" <Ma***@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
Hi,

I am writing an app that will have a socket server to listen for and
process
data from 20+ clients. These clients will send data aproximately every
400-500ms.

I was wondering if it is possible when i have established a connection
with
a client to keep that connection open rather than opening and closing
every
400-500ms as i'd imagine there is overhead involved in this.

Is this possible?


It's possible IF the client does the same thing. if the client close the
connection you will receive a new connection request anyway

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 9 '06 #2
Just adding a bit to this.

Keep in mind that both client and server need to establish a "common ground"
or "common set of rules" that they will both obey. If you want the server
side to use a persistant type of connection then the client must also
implement it. If the client is a 3rd party (ie. not your code) then you
will have to code your server to whatever "rules" the client has.. and the
same is true if the server code is not yours - you will have to code your
client to whatever "rules" the server has.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Charles Cox
VC/VB/C# Developer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:Oq****************@TK2MSFTNGP12.phx.gbl...
Hi,

"Macca" <Ma***@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
Hi,

I am writing an app that will have a socket server to listen for and
process
data from 20+ clients. These clients will send data aproximately every
400-500ms.

I was wondering if it is possible when i have established a connection
with
a client to keep that connection open rather than opening and closing
every
400-500ms as i'd imagine there is overhead involved in this.

Is this possible?


It's possible IF the client does the same thing. if the client close the
connection you will receive a new connection request anyway

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by simon place | last post: by
4 posts views Thread by Funke | last post: by
7 posts views Thread by Martien van Wanrooij | last post: by
2 posts views Thread by =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.