sockets

How to create simple C# full-duplex TCP/IP stream socket connection?

How to create simple C# full-duplex TCP/IP stream socket connection? What do I need? I need - Open Source Libs Tutorials Blog posts/Articles ...

Sockets Asyn Connection

I am new to Async Socket Connection. Can you please explain. How does this technology work. There's an existing application (server) which requires socket connections to transmit data back and forward. I already create my application (.NET) but the Server application doesn't seem to understand the XML data that I am sending. My documenta...

how to translate this (see the code below )to C# ?

how to translate this to C# import java.io.*; import java.net.*; class SimpleServer { private static SimpleServer server; ServerSocket socket; Socket incoming; BufferedReader readerIn; PrintStream printOut; public static void main(String[] args) { int port = 8080; try { port = Integer.parseInt(arg...

Does Indy support raw TCP sockets on Windows?

I'm a C++ programmer, but my question is about the Delphi network socket library Indy. Essentially as Microsoft crippled raw sockets with WinXP SP2 so that TCP data cannot be sent over them, does this then also apply to Indy? One of my friends recommended it to me rather then using the WinSock API. If not, then is the only way to use r...

How to create an image from a string in python

Hi, I'm currently having trouble creating an image from a binary string of data in my Python program. I receive the binary data via a socket but when I try the methods I read about on here like this: buff = StringIO.StringIO() #buffer where image is stored #Then I concatenate data by doing a buff.write(data) #the data from the socket...

"End of Message" String for Sockets

What's a good end of message marker for a socket message schema in order to separate messages as they are received? I had been using <EOF> but that seems a byte or too long and could POSSIBLY be sent in a message, especially if XML data was being sent. Thanks! ...

C# Socket Library

Are there any C# Socket libraries (preferably compatible with Mono) that are better than the standard one built into the framework? I wanted to see if there was a better alternative and start with it instead of finding out about it several months along in the project. ...

C# non-blocking socket without while(true) loop

I'm just trying to make some socket programming, using non-blocking sockets in c#. The various samples that i've found, such as this, seems to use a while(true) loop, but this approach causes the cpu to burst at 100%. Is there a way to use non-blocking sockets using a event programming style? Thanks ...

gethostbyname problem

I wish to use "gethostbyname" in my Suse m/c but it is not returning any structure. but on the other systems it is working fine what could be the issue with my m/c ?? ...

How to stream video over Socket Class (or XMLSocket) with ActionScript?

How to stream video over Socket Class (or XMLSocket) with ActionScript? or\and How to do it using Socket Class (or XMLSocket) in AIR? ...

Can Silverlight 3 OPEN SOCKETS?

Can Silverlight 3 OPEN SOCKETS? If yes. What do I need MSDN if there is any help on this. Open Source Libs/wrappers for encoding/decoding. Tutorials and blog articles on How to do it. If no I need where did you get the info from (link to MSDN or other official SL resource) ...

Can we create a Silverlight Socket Server ONLY using SILVERLIGHT and XML's (NO WCF WPF CONSOL APPS)?

Can we create a Silverlight Socket Server ONLY using SILVERLIGHT and XML's (NO WCF WPF CONSOL APPS)? If yes. What do I need MSDN if there is any help on this. Open Source Libs/wrappers for encoding/decoding. Tutorials and blog articles on How to do it. If no I need where did you get the info from (link to MSDN or other official...

How do I stop reading from a socket if the HTTP response doesn't have a Content-Length header?

The following code snippet reads HTTP response. Say the response doesn't contain a Content-Length header and the Content-Type is not text/html, how would one terminate the while loop? (1. Don't worry about chunked transfer encoding 2. No IO::Socket) while(defined($line = <SOCK>)) { $data .= $line; if($line =~ /Conte...

Java Socket's app randomly stopping

Server public void run () { Socket serversocket = new ServerSocket(port); while(true) { new Thread(new ServerThread(serverSocket.accept())).start(); } } //serverSocket.close(); etc ServerThread public void run() { BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); String input; w...

How to close a TCP connection by port?

I would like to close an existing connection between to application running on my server. If you have a suggestion please reply on how to program this, you will be appreciated. Note that: TCPView application can close the connection exactly as I need, but I would like to run it as a console application or other command line. ...

socket "read" hanging if the MacBook sleeps more than 10 minutes

I am writing an app, where a socket is connecting to a host and downloading a file. The application runs in Mac. Now, while the app is downloading, if I put the MacBook in sleep mode for more than 10 minutes, 60% of the time the app hangs when the computer wakes up. The stack trace shows that, it has hanged in the "read" call. I am abl...

Sandbox violation on second socket send

Hi, I have a Flex client using a Flash binary (TCP) socket for communication with a Java server. I have a localhost (Apache) server providing a crossdomain.xml file which is wide open just while I am testing. My code successfully loads the policy file on startup. I then connect the socket to the server without any difficulty and se...

How to read TCP window size with windows sockets?

Right now im working on a light cliente/server application written in C to check some problems with many computers sending data with TCP to a server through a switch. I need to read some of the flow control variables, like for example the window size, number of retransmitted packets, etc. In linux i do it with getsockopt, method i've...

java heap space and message loss

I'm running a java program on many computers that interact between them. After several hours (2-5 hours) computers start failing (threads start getting into deadlocks, messages start getting lost - peculiar stuff if you take into account that in the first hour or so things were running great). I have a suspicion that it's because I'm us...

C file transfer question

Hi there, I implemented a client-server program that allows to transfer files b/w them. The server is using select() to check changes of sockets. Every test is good except this one: - When server is sending a huge file to client (not yet finished), client hit "Ctrl-C" to kill the client program, then the server is killed too :( The sni...