sockets

Is there any for good Java lib for playing with Sockets connections?

Search for good Java lib for playing with Sockets connections - Is there any such lib or how to play with sockets from pure Java? ...

Avoid using Thread.Sleep() in socket reading

I am writing a usenet newsreader, and calling the XOVER id- message to get all articles in a group. If i am using this code, i am only getting the first 5kB of the response: while((read = _networkStream.Read(buffer, 0, 5000)) > 0) { ret += Encoding.ASCII.GetString(buffer, 0, read); if(read < 5000...

Asynchronous sockets in C#

I'm confused about the correct way of using asynchronous socket methods in C#. I will refer to these two articles to explain things and ask my questions: MSDN article on asynchronous client sockets and devarticles.com article on socket programming. My question is about the BeginReceive() method. The MSDN article uses these two functions...

Receiving broadcast messages

Hi, I'm trying to receive broadcast messages using C# code in an ISDN network with BRI interface at my end. I see the packets sent to the broadcast ip address (239.255.255.255) on some ports using Comm View tool. But when I try to listen to this IP address, it says the address is not in a valid context. But when I send broadcast me...

Is is possible to use IOCP (or other API) in Reactor-style operations?

Hello, Is there any scalable Win32 API (like IOCP not like select) that gives you reactor style operations on sockets? AFAIK IOCP allows you to receive notification on completed operations like data read or written (proactor) but I'm looking for reactor style of operations: I need to get notification when the socket is readable or writa...

Ruby TCPSocket doesn't notice it when server is killed

I've this ruby code that connects to a TCP server (namely, netcat). It loops 20 times, and sends "ABCD ". If I kill netcat, it takes TWO iterations of the loop for an exception to be triggered. On the first loop after netcat is killed, no exception is triggered, and "send" reports that 5 bytes have been correctly written... Which in the ...

flex imap library

Hey all, I'm looking for an imap library to use in flex but can't find any. I know that can be done from scratch, but thought i should ask before reinventing the wheel. Thanks in advance for any pointers. ...

A Question about using jython when run a receving socket in python

Hi, I have not a lot of knowledge of python and network programming. Currently I am trying to implement a simple application which can receive a text message sent by the user, fetch some information from the google search api, and return the results via text message to the user. This application will continue to listening to the users m...

Close socket and select()

So I need to close a particular connection, but the problem is another thread is, at the same time, doing a select() which has the socket as one of the file descriptors it's watching. Will the select() terminate gracefully, or will anything bad happen? ...

Interview Questions that can be asked on TCP/IP, UDP, Socket Programming ?

I am going for an interview day after tomorrow where i will be asked vaious questions related to TCP/IP and UDP. As of now i have prepared theoritical knowledge about it. But now I am looking up for gaining some practicle knowledge related to how it works in a network. What all is going in vaious .NET classes. I want to create a very sm...

EPIPE blocks server

I have written a single-threaded asynchronous server in C running on Linux: The socket is non-blocking and as for polling, I am using epoll. Benchmarks show that the server performs fine and according to Valgrind, there are no memory leaks or other problems. The only problem is that when a write() command is interrupted (because the cli...

Sending the contents of a file to a client

Hello, I am writing a C++ server side application called quote of the day. I am using the winsock2 library. I want to send the contents of a file back to the client, including newlines by using the send function. The way i tried it doesn't work. How would i go about doing this? ...

How can I connect to server using SSL(secure socket layer) on .NET Compact Framework

Hello. I want to change .NET framework v3.5 to .NET compact framework v3.5. But I can't change SSL Stream class to compact framework version. For resolving this problem, I already read some article and msdn library. http://blogs.msdn.com/cgarcia/archive/2009/08/21/enable-ssl-for-managed-socket-on-windows-mobile.aspx http://blogs.msdn....

Socket Communication in C#- IP-Port

I am testing my socket programs at home, in local network. Server and client programs are running on seperate machines. Server program socket is binded as: serverSocket.Bind(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 8999)); Client program (on the other computer) is connected as: clientSocket.Connect(IPAddress.Parse("192.168.2.3"), ...

C Socket Programming, problems with select() and fd_set

Hello I'm learning my way about socket programming in C (referring to Beej). Here is a simple multi-user chat server i'm trying to implement: http://pastebin.com/gDzd0WqP On runtime, it gives Bus Error. It's coming from the lines 68-78. Help me trace the source of the problem? in fact, WHY is my code even REACHING that particular re...

Socket errors of 10048 on the client? Possible causes?

Hello, I'm writing a custom TCP server and client and on doing a ton of requests (60,000 to be exact) I begin to get this socket error of 10048, which should mean "the address is already in use." The error keeps happening unless I pause the process for like 2 or 3 minutes and then begin it again, and then it begins to bring up the same...

Linux Bluetooth programming

I am making a desktop application to connect with an embedded device. I was going to use Windows but due to lack of proper examples and documentation I decided to go with Linux bluez development. Can someone suggest a good resource to go about programming for bluez. I found a MIT documentation but that was about it. ...

HTTP request, strange socket behaviour

I experience strange behavior when doing HTTP requests through sockets, here the request: POST https://example.com:443/service/XMLSelect HTTP/1.1 Content-Length: 10926 Host: example.com User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705) Authorization: Basic XXX SOAPAction: http://example...

how can i send data over internet to any specific computer in subnet.

I want to know how I can send or recieve data over internet to/from a computer in subnet (this is specially in context to PPP users bcoz getting static IP is not so much in practice). I actually want to create an application which can transfer file between 2 specific computer in WAN. so what are things I need to know about to do the sa...

Sockets server design advice

We are writing a socket server in c# and need some advice on the design. Background: Clients (from mobile devices) connect to our server app and we leave their socket open so we can send data back down to them whenever we need to. The amount of data varies but we generally send/receive data from each client every few seconds, so it's q...