473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Help with socket!

Hi,

I asked it previously but maybe I was not clear enough for having any
comments from you :)

When a socket is sending data, is there any test I have to do to be sure
that the outgoing packet is sent and I can trigger another sending of
messages?

Is it possible for a socket that has so much consecutive send, to loose
any of the messages it has to send?

Thank you
Marty
Nov 21 '05 #1
2 784
If you are using System.Net.Sockets there is a BeginSend and an EndSend
that you may use. I personaly cannot say I have had any problems with
losing packets or data even with some of the most robust network
applications. In your protocol you may wish to allocate part of your
header to ensure that packets are given an order. Also remember that
packets may be split up.
You may send 3 blocks of data and it might show up as 2 1/4 in one
packet and the remainging 3/4 in the second packet. Your application
needs to be able to handle this and reconstruct it. Once you have taken
care of that problem implemetning a simple numbering system in your
protocol header will ensure that you can tell when a packet is lost or
for some reason or another accidentally sent in the wrong order (if
possible).

Nov 21 '05 #2
Hi Marc,

Thank you for your reply.
You may send 3 blocks of data and it might show up as 2 1/4 in one
packet and the remainging 3/4 in the second packet. Your application
needs to be able to handle this and reconstruct it. Once you have taken
care of that problem implemetning a simple numbering system in your
protocol header will ensure that you can tell when a packet is lost or
for some reason or another accidentally sent in the wrong order (if
possible).


Yes, this I handle. Messages can but cut, so at the other end, the
client must keep in mind of the cutted part and save it.

But in the socket.send itself, do you think that this can be overrun?
and loose data?

I may do a test and send 1000 of messages in a loop and look at what the
client receive.

Regards,
Marty
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Martin | last post by:
I am a PHP newbie (just got my "Hello World" page working this morning). I'm doing some R&D work to see if PHP is viable for a situation I have. To accomplish what I want to do, I have to have the...
1
by: Jonathan Hayward | last post by:
Just after posting the previous request, I realised that my test case worked after I added flushes. The next problem I have is that, in the real program, the server gets an EOFError when it first...
1
by: ADE | last post by:
Hi everyone well from my last post I found what I am looking for I have some code now that transfers files I have added a GUI to it and need some help with two things one my loadtemplate()...
0
by: Phadnis | last post by:
hi. i have set up a proxy server which gets the text content but does not get the images. wat additional code i need to rite for this.. also this code works with only simple website that does not...
9
by: AA | last post by:
This is making me crazy!! Please, if some body can help me. I'm testing a ver simple socket client. In my test I just open and close a connection (in a loop) to my local IIS server (port 80)...
5
by: fjlpf | last post by:
Hi I am a beginner of programming. These days, I try to develop a ftp program. But I find it is harder than I have thought. I want to post my code, then concentrate on resolving the...
5
by: ranishobha21 | last post by:
Dear all, i want to send some unix commands to remote unix machine in france through php.i am using socket communication in php, i have written a socket communication program so that it...
3
by: doc | last post by:
What will a flash xml client socket connect to? I have a working php TCP/IP server socket bound to a port >1023 and the flash client will not even connect to it. I can connect to it with non-xml...
1
by: orehian | last post by:
Construct a one-time password system. · Write a server code and a client code. The server code takes as input a username and a one-time password from the client and then sends a message...
6
by: zaina | last post by:
hi everybody i am nwebie in this forum but i think it is useful for me and the member are helpful my project is about connecting client with the server to start exchanging messages between...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.