The software I'm working on needs to be able to connect to many servers in a short period of time, using TCP/IP. The software runs under Win32. If a server does not respond, I want to be able to quickly continue with the next server in the list.
Sometimes when a remote server does not respond, I get a connection timeout error after roug...
Disclosure: the code I'm working on is for university coursework.
Background: The task I'm trying to complete is to report on the effect of different threading techniques. To do this I have written several classes which respond to a request from a client using Java Sockets. The idea is to flood the server with requests and report on how...
We are connecting to a web service as follows:
URL url = new URL("https://...");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
conn.setRequestProperty("Content-length", "" + data.length());
conn.setDoOutput(tr...
Hi folks,
I was recently elected programming team lead for my community college's engineering club. We're going to put a solar panel on a roof. The programming part involves
Controlling servos to adjust the orientation of the panel
Sending data on the electricity collected by the panel to a server (we haven't decided whether we want...
Hi
I am trying to pass whole structure from client to server or vice-versa. Let us assume my structure as follows
struct temp {
int a;
char b;
}
I am using sendto and sending the address of the structure variable and receiving it on the other side using the recvfrom function. But I am not able to get the original data sent on the...
I'm not a Java programmer at all. I try to avoid it at all costs actually, but it is required that I use it for a class (in the school sense). The teacher requires that we use Socket(), BufferedReader(), PrintWriter() and various other things including BufferedReader()'s readLine() method.
Basically, this is the problem I'm having. T...
Hi.
I'm using unix scoket for data transferring (SOCK_STREAM mode)
I need to send a string of more than 100k chars. Firstly, I send length of a string - it's sizeof(int) bytes.
length = strlen(s)
send(sd, length, sizeof(int))
Then I send the whole string
bytesSend = send(sd, s, length)
but for my surprise "bytesSend" is less tha...
I've been dabbling with socket servers in Java and now I'm ready to get my feet wet with an idea I had.
I would like to use python for my socket server and obviously AS3 for my client. I'm able to create a full chat using my own python socket server but I'm almost clueless what to do now that I want to add in LIVE video (want to make i...
My code basically needs to start up a simple chat server with a client. Where the server and the client can talk back and forth to each other. I've gotten everything to be implemented correctly, but I can't figure out how to shut down the server whenever I'm done. (I know it's ss.shutdown()).
I'm wanting to end right now based on a...
I'm having to write a TCP Server for a project at work and I googled around how to. I got an MSDN answer and managed to get it working, but I have no clue how to get data to be able to receive back and forth. The sockets aren't going to be connected more than about 30 seconds MAX (because my boss doesn't want sockets staying open on the ...
I want to devlop java chat application.
I am looking for any java framework that will help me in devloping chat application.
So that i can easliy devlop the chat application using the framework.
The application needs to run only in LAN.
I want the chat application like yahoo chat (with only one main room).
Please suggent me any open s...
I'm interested in two situations:
How to do it from C++?
How to do it from system's shell?
Answers for Linux, Windows and OSX are welcome.
...
I would like to know not only user-side differences, but differences / common parts in Linux kernel implementation as well.
...
I have a Linux file descriptor (from socket), and I want to read one line.
How to do it in C++?
...
i'm still kind of newbie to ruby, but i became used on using ruby sockets, cause i used the 'Socket' class many times, and so i having full control to my sockets and their options.
the thing is i'm trying to make it a little easy for me, so i'm trying to use the 'TCPSocket' class ,witch (i guess) doesn't give u much control as the 'Sock...
FYI This is homework. I have to build a Java Chat server. I have been able to build a server which communicates with 1 client. But I need this to communicate with multiple users.
A user is supposed to type in the person's name they wish to talk to followed by a dash (-) and then the message to be sent. I am able to get users signed on b...
Say I am writing a chat server and client that allows users to login with their user-name and password. Now I could just send and receive the information as plain-text but there is the risk that the information may be intercepted. So the socket should be secured to protect the user. I am not interested in certificates or verifying identi...
i already have some experience with java and a bit with c/c++, i'd like to learn php now. i want to make some applications with sockets, which i already understand a bit of. however, it seems most books focus on php for web development, whereas i'm more interested in it as a general purpose programming language.
am i "doing it wrong" or...
I have a small application that redirects the stdout/in of an another app (usually command prompt or bash for windows). The problem is that if the connection is interrupted the my process has no idea and it never closes because of this line:
WaitForSingleObject(childProcess.hThread, INFINITE)
I was thinking of having a loop with somet...
I've got a basic HTTP client set up in C++, which works ok so far. It's for a school assignment, so there's lots more to do, but I'm having a problem.
I use the recv() function in a while loop, to repeatedly add pieces of the response to my response buffer, and then output that buffer each time. The problem is, at the end of each piece ...