473,675 Members | 3,332 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET Socket Issue: Messages come in small chunks

1 New Member
I have a .NET socket sender that sends a series of messages via a timer with interval of 50 milliseconds. I starts sending one entire message of 230 bytes, after that, it sends a series of entire messages of 250 bytes. The listener receives correctly the first message of 230 bytes at once, but the subsequent messages of 250 bytes it breaks it into two pieces of 230 and 20 bytes. This is causing problems, so does anyone have an idea why this happens?
Apr 24 '13 #1
0 835

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2203
by: lauras | last post by:
Hello, We are having an issue with Python SSL sockets using Apache and mod_python. When we try to get an SSL connection using the following code: con = httplib.HTTPSConnection( self.HOST, self.PORT ) #con.set_debuglevel(10) con.putrequest( "POST", "" ) con.putheader( "Content-Type", "text/xml" )
0
913
by: kevin | last post by:
Hello all, I am hoping someone could point me in the right direction. I am working on a project that requires my client socket to maintain an active connection and reply to information form my server at long intervals. The server "pings" the client on a regular basis when there has been no activity in order to ascertain whether or not the connection is still active. it sends the client a particular bit of information and waits for a...
5
4490
by: kuba bogaczewicz | last post by:
Hello all, for my school project I have to write a small peer-2-peer application using Sockets, and I've chosen C# for the task. I've been doing some research on the topic, and I would really appreciate if someone checked if I got all things right. I am going to use asynchronous connections, and here comes some of my doubts: -> I want to send each message in a scheme: 4 bytes with the size, then actual message. According to MSDN I got...
6
1552
by: MackS | last post by:
Hello everyone I am faced with the following problem. For the first time I've asked myself "might this actually be easier to code in C rather than in python?", and I am not looking at device drivers. : ) This program is meant to process relatively long strings (10-20 MB) by selectively modifying small chunks one at a time. Eg, it locates approx. 1000-2000 characters and modifies them. Currently I was doing this using a string object...
6
2235
by: Khadim | last post by:
I am using the following code, don't know what am i missing. in BYTE2 I am not getting any information from the remote application. any guidance would be highly appreciated, thanking you in advance // PatentRequestPaket is a structure defined above in the class //public struct PatentRequestPacket //{ // public char Key;// = new char; // public char PatentNumber;// = new char; // public int NumPages;
1
1184
by: MuhammadUsman | last post by:
Hi I am writing a simple client server program in c# using sockets over UDP. Can I use same port for both the client and server to send and receive data (like in TCP) . I am trying to do the following but its not working. sockListener = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); sockListener.Bind(ipEHost); // port 4050 when i do it on both server and client, an exception is thrown that only one app...
3
5381
by: Willy Stevens | last post by:
Hello, In my application I have to read sometimes quite big chunk of binary data. I have a buffer which default size is 32000 bytes. But how could I read binary data that exceeds 32000 bytes? Is allocating more size to buffer and copy data that exceeds 32000 bytes at tail the only way or are there any other possibilities?
3
3610
by: Joe Blauth | last post by:
Hi all, I am currently working on a small application that sends messages from a client to a server and receives messages in return. Basically the functionality is made with sockets which is working just fine except of one little thing. whenever the client tries to receive a message the server has sent it goes into a hang. unfortunately without an error or exception at all. the communication itself (sending message from client to...
3
3043
by: A. W. Dunstan | last post by:
I'm creating a socket as follows: m_networkSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); m_networkSocket.LingerState = new LingerOption(true, 1); m_networkSocket.Blocking = true; m_networkSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true); m_networkSocket.SetSocketOption(SocketOptionLevel.Socket,
0
1111
by: od88 | last post by:
edit: nevermind fixed it by re-opening the sockets whenever this one specific error string is detected this is my first time using winsock in years and am having some trouble. pretty sure all it needs is a simple line of code for closing a socket or something similar..i've just killed too many hours trying different things, so i figured i'll just ask the experts for once and hopefully nip it in the bud i'm building off a very basic open...
0
8968
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8680
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8722
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7501
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6377
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4261
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2867
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2125
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.