|
by: Pete Davis |
last post by:
I've written an async socket server app and I'm having an issue with the
EndReceive() call.
My begin receive call is:
sockState.RemoteSocket.BeginReceive(sockState.ReceiveBuffer, 0,
SocketState.BufferSize, 0, new AsyncCallback(this.ReadCallback), sockState);
The ReadCallback() method begins:
|
by: Pete Davis |
last post by:
I'm trying to do async socket IO in a socket server in C# and I'm having
trouble on the receive side of things.
I've tried variations of the code below and I just can't seem to get it to
work. I think my _receiveEvent.Set() calls may be misplaced among other
things. EndReceive() gets called when the first message is sent.
What I want it to do is to continue to receive until the entire message has
arrived. I'm not really sure how to...
|
by: Brian Rice |
last post by:
I have a socket application that is sending and receiving packets
asynchronously. It works great except, when I receive packets that are
larger than my receive buffer which then generate several EndReceive
calls... these calls seem to be sometimes coming out of order.
For example, the following is from my log file:
Connection at 5/1/2004 11:39:14 AM
SENT> ZZZ:1:FMZZZ:ID1234:PWAAAA:VR100:\0
RCVD>...
|
by: Bruce Vander Werf |
last post by:
I am using the asynchronous send/receive methods of the Socket class.
When the remote end closes the socket, the callback for receive is
called and EndReceive returns 0.
Socket.Connected still returns true at this point, which I know is
expected behavior, so when I reach this state, I begin sending on this
socket every few seconds until an error is generated.
After the exception is raised, Socket.Connected returns false.
|
by: Ken Foster |
last post by:
I have a Socket based application using the asynchronous Sends and Receives
of the Socket class. I send out XML strings using BeginSend/EndSend from a
client end point, the server side does a BeginReceive/EndReceive.
I knew a message could be split up between Receives and I look for an end of
message marker (and continue receiving if not there) before processing the
complete message. However I was told (on this board I think) that I would...
|
|
by: mscirri |
last post by:
The code below is what I am using to asynchronously get data from a
PocketPC device. The data comes in fine in blocks of 1024 bytes but
even when I send no data from the PocketPC constant blocks of 1024 with
all values set to Null arrive. Other than examine a block of 1024 to
see if the entire block is null, is there any other way to determine if
, say a chat message "Hi Charlie" has been received completely?
|
by: Steve Richter |
last post by:
I dont get the point of socket.BeginReceive and socket.EndReceive. As I
understand it, BeginReceive will start a 2nd thread, call the
ReceiveCallback delegate in the 2nd thread, then block until the
socket.EndReceive method called in the 2nd thread receives some data
from the socket.
If the 1st thread will block until the 2nd thread receives some data
from the socket, what is the point of starting up the 2nd thread? I am
aware I can...
|
by: Ken Foster |
last post by:
I'm creating a system wide (distributed) Publish/Subscribe Event Broker using
..NET Sockets as the transport mechanism. I'm doing all my
connects/accepts/sends/receives
asynchronously (well, not all, but thats beside the point really). I also
have an EventBroker that all clients connect to and the EventBroker holds the
open socket connections to communicate with. My problem is, how do I know
when my EndReceive call has finished a message?...
|
by: Ken Foster |
last post by:
I have a Socket based application using the asynchronous Sends and Receives
of the Socket class. I send out XML strings using BeginSend/EndSend from a
client end point, the server side does a BeginReceive/EndReceive.
I knew a message could be split up between Receives and I look for an end of
message marker (and continue receiving if not there) before processing the
complete message. However I was told (on this board I think) that I would...
|
by: Pat B |
last post by:
Hi, I'm writing my own implementation of the Gnutella P2P protocol
using C#. I have implemented it using BeginReceive and EndReceive
calls so as not to block when waiting for data from the supernode.
Everything I have written works fine sending and receiving
uncompressed data. But now I want to implement compression using the
deflate algorithm as the Gnutella protocol accepts:
Accept-Encoding: deflate
Content-Encoding: deflate
in the...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|