which more performant
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   zhebin_cong
Posted On:   Friday, May 7, 2004 08:07 PM

hello from some books, i learn that after sending the data,the socket port should be closed,but consider my scinario: my project is consisted of two subsystem,let me call them:sysA and sysB,they communicate with each other through socket,both of them open a server socket ,the port is special and dedicated to each other,no other client use it. under such situation,i think keeping the socket connection opening is a good solution,it is not necessay to close it at end of each communication and reopen it at the beginning of next communication,because the opening and closing the socket frequently will make the performance a bit lower. what is your opinion?    More>>

hello


from some books, i learn that after sending the data,the socket port should be closed,but consider my scinario:


my project is consisted of two subsystem,let me call them:sysA and sysB,they communicate with each other through socket,both of them open a server socket ,the port is special and dedicated to each other,no other client use it.


under such situation,i think keeping the socket connection opening is a good solution,it is not necessay to close it at end of each communication and reopen it at the beginning of next communication,because the opening and closing the socket frequently will make the performance a bit lower.


what is your opinion?    <<Less

Re: which more performant

Posted By:   Simon_Ablett  
Posted On:   Monday, May 17, 2004 05:59 AM

Keeping the sockets open will be a lot faster than continually opening and closing them but you will have to factor in the inclusion of error checking code to handle the network connections getting dropped for reasons beyond your control.

Regards.

Re: which more performant

Posted By:   Absar_Ahmad  
Posted On:   Friday, May 14, 2004 01:16 AM

If ur application needs errorfree, complete information transmission then go for stream Socket(Open sockets)

if ur application need just speed if it can afford to lose some data during transmission (e.g video ) then go for Datagram sockets (close Sockets)
About | Sitemap | Contact