I have a client and server, client sending file to server. When i transfer files on my computer(in local) everything is ok(try to sen file over 700mb).
When i try to sent file use Internet to my friend in the end of sending appears error on server "Input string is not in correct format".This error appears in this expression fSize = Con...
I've got a strange issue with a server accepting TCP connections. Even though there are normally some processes waiting, at some volume of connections it hangs.
Long version:
The server is written in Perl and binds a $srv socket with the reuse flag and listen == 5. Afterwards, it forks into 10 processes with a loop of $clt=$srv->accept...
Lets say a listening socket is created in PHP, and it accepts a secure connection.
How do I know that it's encrypted and how do I decode it?
...
I have a server application that binds to a port and listens on it. I've set up the router to forward the data on this port to the server.
Now, on the client side, I don't actually bind() the socket to any port, and I usually end up with a different port everytime. In that case, how can I prepare the router to forward that port to the c...
Is there a way to reuse SSL socket connections on the iPhone. I'm seeing an extra 3-4 second overhead in doing SSL handshaking. I'm using NSURLconnection currently to do the API calls and each one of them is taking 4-5 seconds on Wifi. Any suggestions would be greatly appreciated.
...
Hey all, I have this strange problem with recv(). I'm programming client/server where client send() a message (a structure to be exact) and server recv() it. I am also working with multiple sockets and select().
while(1)
{
readset = info->read_set;
info->copy_set = info->read_set;
timeout.tv_sec = 1;
timeout.tv_usec =...
Hi Everyone,
I am again stuck with my webcrawler application (multi-threaded). It's been tested on my machine and our test machine and there's no problem (up to 15 hours of running), however on production use, it gives this type of error after 1 or 2 hours of running:
WebCrawler has encountered a problem and needs to close. We are s...
This has got to be a FAQ, so can someone please just direct me to a "network programming for dummies" URL?
The server wants to push information to a client or broadcast to all, when an event happens - as opposed to the clients constantly polling the server "just in case". The client then updates a browser page display.
How do I do that...
not java specific, but when I say OutputStream os = sock.getOutputStream();
is there a way to determine stream's encoding charset? or do I have to know encoding charset ahead of time to properly read it? This is for arbitrary socket connection.
...
Hi there,
I'm trying to make a program which listens to the client input stream by using socket programming and timer
but whenever timer executes..
it gets hanged
Please help me out
here is the code...
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
try
{
S...
How to determine if I can write the given number of bytes to a filehandle (socket actually)? (Alternatively, how to "unread" the data I had read from other filehandle?)
I want something like:
n = how_much_can_I_write(w_handle);
n = read(r_handle, buf, n);
assert(n==write(w_handle, buf, n));
Both filehandles (r_handle and w_handle) ...
hi everybody!
I'm running out of file descriptors when my program can't connect another host. The close() system call doesn't work, the number of open sockets increases. I can se it with
cat /proc/sys/fs/file-nr
Print from console:
connect: No route to host
close: Bad file descriptor
connect: No route to host
c...
I want to start a server which listen to a port. I can specify port explicitly and it works. But I would like to find a port in an automatic way. In this respect I have two questions.
In which range of port numbers should I search for? (I used ports 12345, 12346, and 12347 and it was fine).
How can I find out if a given port is not occ...
Hi,
I'm trying to use the Java commands pw.println() and br.readLine() in Matlab because I have set up a socket (input_socket2) between Matlab and a command-line program I want to control using Java classes BufferedReader and PrintWriter. Before the following snippet of code, I implemented another socket that goes between 2 computers. ...
I'm writing an application that is split into two parts for Mac OS X - a daemon and an agent. I'm using a standard unix socket to communicate between the daemon and the agents. That is, the socket is created with PF_UNIX and SOCK_STREAM.
When agents are created (whenever a user logs in), one of the first things it does is to connect to...
I'm experiencing a bizarre problem with sockets between a Java Knopflerfish client bundle and a PHP (CLI, not web) server.
The client/server pair work fine when both are located on the localhost, and all data is transmitted successfully. However, when the Java client exists on a different machine, connections to the server are successfu...
There are two connected sockets. How can I interconnect them?
Data appeared on the one socket should be written to the other.
EOF/FIN should propogate well. If one is half-closed, the other should also be half-closed.
int client = get_connected_client_socket();
int proxy = get_connected_proxy_socket();
negotiate_with_proxy(proxy);
i...
Hello,
I am working on a chat implementation with Java sockets. I have focused on few functionalities, like authentication, one person chat and a group chat. I was thinking about adding file transfer functionality, and I wonder what's the good practice about this. Should I have separate socket on the server with different port listening...
HI folks,
I'm trying to establish connection to a remote server using ruby socket connection TcpSocket.
I started with TcpSocket.new(port,host)
Now, How do I pass the credentials to it.
The remote server needs credentials to allow me to connect.
Any help is very much appreciated.
Thanks
...
Hi, I'm doing some networking programming for Windows right now envolving the HTTP protocol.
Is it possible to handle prosies at socket level? And SSL proxies? If not, does Windows provide something at a higher level to handle them? I wouldn't like to use a third party library, but if there's no other way to go I would reconsider it.
A...