hi , I have a problem with socket.send
mesajlar = Encoding.ASCII. GetBytes("UGIR" );
socketResultVal ue = socket.Send(mes ajlar,0,mesajla r.Length,
SocketFlags.Non e);
socketResultVal ue =
socket.Receive( mesajlar,0,mesa jlar.Length,Soc ketFlags.None);
mesajlar = Encoding.ASCII. GetBytes("UIST, 1");
socketResultVal ue =
socket.Send(mes ajlar,0,mesajla r.Length,Socket Flags.None);
socketResultVal ue =
socket.Receive( mesajlar,0,mesa jlar.Length,Soc ketFlags.None);
this is the code i am using , It sends all together , so it makes error.
How can I handle this i mean
send UGIR and wait
send UIST,1 and wait and so on
?
thanks in advance 1 1601
Hasan O wrote: hi , I have a problem with socket.send
mesajlar = Encoding.ASCII. GetBytes("UGIR" );
socketResultVal ue = socket.Send(mes ajlar,0,mesajla r.Length, SocketFlags.Non e);
socketResultVal ue = socket.Receive( mesajlar,0,mesa jlar.Length,Soc ketFlags.None);
Try socket.Receive( mesajlar,0,sock et.Available,So cketFlags.None) ;
mesajlar = Encoding.ASCII. GetBytes("UIST, 1");
socketResultVal ue = socket.Send(mes ajlar,0,mesajla r.Length,Socket Flags.None);
socketResultVal ue = socket.Receive( mesajlar,0,mesa jlar.Length,Soc ketFlags.None);
Also: socket.Receive( mesajlar,0,sock et.Available,So cketFlags.None) ;
this is the code i am using , It sends all together , so it makes error. How can I handle this i mean
send UGIR and wait
send UIST,1 and wait and so on
? thanks in advance
I hope it will help you.
£ukasz
PS. mesajlar ??? Is that in Hungarian? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dr.Kadzija |
last post by:
i have a client-server application. client and server should communicate via
tcp sockets. ok, so i use Sockets, PrintWriter and BufferedReader. the
problem is that: both client and server will send each other multiple lines
(using PrintWriter.println()) at a time, and i don't know how many lines
each of them will send. this wouldn't be a problem if a sender could end his
turn with a pre-defined character or string (e.g. "\n", "bye" or...
|
by: Dmitry Akselrod |
last post by:
Hello everyone,
I have a vb.net application that wraps the TCPListener object
in a class. The server connects to the local interface and establishes
itself on port 9900. It then polls for pending connections every 500ms.
I also have a vb6 application that uses the WinSock control at the other end
of the communication tunel. I have to work with vb6 here because it uses
less memory than .NET.
|
by: Stuart Norris |
last post by:
Dear Group,
I am having a problem setting SocketOptionName.SendTimeout on a client
TCPIP application using the sockets in .NET. From the on-line help it
is possible to set a SocketOptionName.SendTimeout for sends on TCPIP
sockets.
In all the tests that I have done with both Async and Sync sends the
send returns immediately with the number of bytes sent (< 100 in my
messages).
|
by: Dmitry Akselrod |
last post by:
Hello everyone,
I have a vb.net application that wraps the TCPListener object
in a class. The server connects to the local interface and establishes
itself on port 9900. It then polls for pending connections every 500ms.
I also have a vb6 application that uses the WinSock control at the other end
of the communication tunel. I have to work with vb6 here because it uses
less memory than .NET.
|
by: Dmitry Akselrod |
last post by:
Hello everyone,
I have a vb.net application that wraps the TCPListener object
in a class. The server connects to the local interface and establishes
itself on port 9900. It then polls for pending connections every 500ms.
I also have a vb6 application that uses the WinSock control at the other end
of the communication tunel. I have to work with vb6 here because it uses
less memory than .NET.
| |
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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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...
|
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();...
| |
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: 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...
| |