Can we get the state (free space) of a java ServerSocket queue ??
The goal is to throw an exception when it's full ...
Some details about the ServerSocket queue :
Class ServerSocket
...
ServerSocket()
...
The maximum queue length for incoming
connection indications (a request to
connect) is set to 50. If a connect...
I'm a beginner in Java and I have an assignment to build P2p File Sharing Java application.
I started by creating server and client. Client can send messages to server and server responds. I believe the next step should be inserting the Thread into the server class. I read all about it and tried it bud I just can't pull it off. I hope so...
hi,
how to inform the server that is a client is interrupted, and close the socket?
Thanks!
...
Hey,
since quite some time I'm trying to listen to .pls files (shoutcasts). I have to say that I failed horrible.
Since StreamFurious can do it it must be possible. First I tried to connect to the shoutcast via sockets (TCP and UDP) --> failed. I couldn't even receive one byte from the server.
I'm at the verge of tears. I don't even ha...
I have a class that inherits from TcpClient. In that class I have a method to process responses. In that method I call I get the NetworkStream with MyBase.GetStream and call Read on it.
This works fine, excpet the first call to read blocks too long. And by too long I mean that the socket has recieved plenty of data, but won't read it un...
Hello,
I'm looking for a .NET implementation of the SCTP protocol.
A component or a C#/F# source code would be preferred, however if no such thing is available a VB.NET source code could probably work too.
The project I'm working on is targeting the .NET Framework v3.5 but anything that works with .NET v2 to v4 is welcome.
...
I've been using getaddrinfo for looking up socket addresses for basic socket commands. Recently, though, the addresses it returns to me are for bogus IP addresses, which I have found using inet_ntop. I've tried my code, as well as that provided in Beej's Guide, and they both produce the same results. Here's the code:
struct addrinfo hin...
Hi guys!
I have two simple Python files: client.py and server.py. The client simply sends the text you type to the server, via UDP socket.
The port assigned and listened to is 21567, BUT... the line reading:
print "\nReceived message '", data,"' from ", addr
in server.py outputs the addr to be something looking like this: ('127.0.0...
In Rails what would be the best way of integrating a UDP listening process that updated certain elements of the model (specifically its going to be adding rows to one of the tables).
The simple answer seems to be start a thread with the UDP socket object within the same process, but its not clear quite where I should even do that which ...
I'm extremely excited about html5's websockets spec but I have a concern.
These days everyone is operating off of some network, with routers (wired/wireless) that have built in firewalls, windows has a built in firewall too.
With that in mind when the server attempts to connect back to the browser that started the websocket handshake...
Is there any tutorial, that shows, how to work with Poco::Net::MulticastSocket ?
...
Hi,
I am working on a sample application which sends file to other device. I have 2 buttons on my window, one is to send and other is to stop file transfer. Send; send the file to destination and Stop: stops the sending process.
When I send the multiple files to destination, all files reach destination properly. But if I click send a...
I have the following code in C.
void setNonBlocking(SOCKET fd){
int flags;
if (-1 == (flags = fcntl(fd, F_GETFL, 0)))
flags = 0;
fcntl(fd, F_SETFL, flags | O_NONBLOCK);
}
int main(){
int sock;
connect(sock, .....);
setNonBlocking(sock);
....
close(sock);
//we will do something here but the application exits in/af...
Hello,
I have a listener that returns a TcpClient that must read data until the other side closes or until we stop.
I have created a simple Form with two buttons. One starts one connection and the other stops it.
The problem is that when I have a IOException due to the timeout of the Read the socket is closed and I cannot communicate...
Problem:
scriptA.cgi is sitting in an infinite loop and handling an open socket to a Flash client.
scriptB.cgi is called from the web, does what it needs to do and then needs to inform scriptA to send a message to the client.
Is this possible? I'm stuck on how to have scriptB identify the instance of scriptA that is sitting there with t...
I've got a client-server tiered architecture with the client making RPC-like requests to the server. I'm using Tomcat to host the servlets, and the Apache HttpClient to make requests to it.
My code goes something like this:
private static final HttpConnectionManager CONN_MGR = new MultiThreadedHttpConnectionManager();
final Ge...
I want my client class to run a thread that sends String information (order) to the server continuously every 5 sec. But instead thread is destroyed after it sends first order. I dont know why and how to stop it, can somebody help me?
below code;
public class Cashier implements Runnable
{
private static final int MAX_DELAY = 5000;
...
Hello
I am currently using sockets to try and send messages between a Silverlight 3 client and a .NET3.5 service. I can set up the TCP connection fine, and send data across, but my issue comes with serialising and deserialising DataContracts.
Currently we are using WCF PollingDuplex binding to do this work, but we are not happy with i...
I have a problem with a socket library that uses WSAASyncSelect to put the socket into asynchronous mode. In asynchronous mode the socket is placed into a non-blocking mode (WSAWOULDBLOCK is returned on any operations that would block) and windows messages are posted to a notification window to inform the application when the socket is ...
how can i forcefully send data packets over gprs n/w eventhough wifi is on ?
how to create socket for gprs n/w in android and to know gprs ip ?
thanks;-)
...