sockets

Winsock: Windows networking programming in C++

I need books that truely explian sockets in windows in C++ ive been looking at tutorials but they dont tell what anything means they dont go into great detail so i need come books on Winsock in C++ for windows ...

Are the xxxxAsync Methods in .net35 sockets of any benefit when building a socket client app?

I understand the benefits of the new async sockets in .net35 as applys to building socket servers. 1) Please do these benefits apply to building client applications? 2) what would be the recommended way to use the xxxxAsync pattern when building an application that establishes multiple client connections. I would really appreciate your...

SocketException on Windows XP home edition on connect: an invalid argument was supplied

Hi, Our software needs to connect to an server and we do that with use of an TCPclient. 50+ systems (all Windows XP pro) are using the software and have no problem with connecting. The software also has been tested on windows vista an Windows 7 beta. Today there are some external people here for training and one of them has a laptop wi...

Comparing string data received from a socket in C

I have a question on sockets. I have this code: while(bytes = recv(sClient, cClientMessage, 599, 0)){ This puts the message it recives into cClientMessage and the message is always "Message". How I made an if statement like if(cClientMessage == "Message"){//do func}. Now this code will not do the function I want. I think this is b...

How to restart a sockets program?

I need my server to stay connected to the server. Does anyone know how to do this? Or post links tutorials anything? Also it says when it restarts 'could not accept client' so how would I clear everything and make it accept it? ...

Encode/Decode xxxclass to byte[] than send it to Remote PC with C#

Hi i have got a TCP/IP Socket project. i can send string messages to Server with Client side and i can get responses from server. But getting one string message and sending only one string (or any other object).I wanna Encode Personel class to Byte array after send to Clients from server side.And Decode it. than get values from my class...

How can I use sockets in Silverlight 2?

Hi, I am trying to implement a Silverlight 2 client application that takes data from a server via socket-based communication. I've heard that in Silverlight 2, this process is more complicated due to the fact that it is required to use a policy server, and that could slow down my application, not to mention that each string passed throu...

Is there a wide character version of WSABUF structure in "Microsoft Visual Studio 8\VC\PlatformSDK\Include\WinSock2"

Hi, Is there a wide character version of WSABUF structure in winsock? I want to write Japanese data on the socket. ...

Getting an ObjectDisposed exception when calling Shutdown then Close on a Socket

I have a SocketState object which I am using to wrap a buffer and a socket together and pass it along for use with the Begin/End async socket methods. In the destructor, I have this: ~SocketState() { if (!_socket.Connected) return; _socket.Shutdown(SocketShutdown.Both); _socket.Close(); } When it gets to Close(), I get an...

c# SocketAsyncEventArgs

Has any one worked with the "SocketAsyncEventArgs" class and ReadAsync? where do i put the read buffer and where do i put the send buffer? or can i only read or send at one time not both? im a bit confused can some help me just write some code to send a byte array? ...

REST for low latency messaging . .

why dont you see more people using REST architecture for client server system. You see people using sockets, or TIBCO RV or EMS or MQ but i haven't seen much basic REST architecture does anyone know any reason why you would avoid using this architecture for client / server communication for high through put / low latency ...

How can I modify received socket messages in Perl?

I am writing a Perl program that sends and receives messages from two sockets and acta as a switch. I have to modify the received messages received from one socket, prepend 3 bytes to the data, and finally send the modified messages to another socket. I adopt select()...sysread()...syswrite() mechanism to poll for messages between socket...

Fastest serializer/deserializer with lowest memory footprint in c#?

Hi, I am currently using the binary formatter (Remoting) to serialize/deserialize objects for sending around my LAN. I have recently upgraded from 2.0 to .Net 3.5, has 3.5 introduced any new types to improve serialization performance? I’ve looked at the DataContractSerializer but this serializes anything to underlying xml right … which...

Socket reading data asynchronously with special message terminator

I have to connect via tcp to a server that terminates responses with 0x4 instead of the standard 0x0. I want to keep things simple and use a synchronous send/receive from the socket class. The send works but the receive blocks indefinitely because the server does not terminate messages with 0x0. I cannot synchronously read to the first 0...

How do you get the ip address from a remote machine?

I'm writing c++ code that I need to run on both windows and linux and I'm looking for a function call that will return the ip address of the box the app is running on. Is there such one? ...

Send multiple datagrams using a single send() call?

When datagram-based socket (raw socket or UDP) is used with gather-style send, all the data are concatenated to form a single IP packet. Is there a way to send several datagrams using a single call? ...

How to read and write network sockets in Java ME on a device with simplex connectivity?

Dear all, I am working on a mobile communicator and after establishing connection to the server using following method (to illustrate that I am using StreamConnection, InputStream and OutputStream) I distribute inputStream and outputStream between two separate threads, lets call them Sender and Receiver. Connection method: private I...

What is the best way for distributed processes to communicate asynchronously?

I'm developing an application in which distributed components talk to one another over a network, in an asynchronous, pub/sub kind of way. For this, I like the idea of sending XML over sockets - it's asynchronous, I don't need a server of any kind, and it can work locally or over a network. I would have to roll my own pub/sub mechanism...

Writing a socket-based server in Python, recommended strategies?

I was recently reading this document which lists a number of strategies that could be employed to implement a socket server. Namely, they are: Serve many clients with each thread, and use nonblocking I/O and level-triggered readiness notification Serve many clients with each thread, and use nonblocking I/O and readiness change notifica...

when connect a c++ sever,flash socket send wrong data.

I write a chat server in c++ and a flash client in flex3. the message exchanged between them is like [message_len+messagebody] where the flash open on my owner windows xp system,it works ok,the message sent and recieved is right. but when I put the flash on a red hat 5 's apache server, try to open it in the web browers, the flash socke...