I have a program that uses socket in this way: Client A has a socket connection to Server B. A sends some data to B. B processes data and return results to A.
However, sometimes, B might take too long to process data and in such a case, for efficiency consideration, A would expect B to simply...
I have a server using unix domain socket. It works in a standard way: listening for requests and accepting each of them by running a separater thread for it:
while(true){
int clientsocket;
clientsocket=accept(serversocket, NULL, NULL);
ClientHandler * ch = new...
I have a server written in sun/j2se. It uses unix domain socket in a standard way. It listens for connection requests in background all time. After accepting a request, it creates a object of taking care of some job, passes it to an object of Thread, and starts the Thread object:
while(true){...
Usually, a CGI would create many temp files. For example, it may dynamically create many maps, which do not exist on disks. So, after a web browser session expires, some of these files will be no use any more. But some (e.g., a map for recent climate) may serve multiple requests at different...
I want to display a outline state map in web browser. Each state is going to be filled out with a color, which indicates some property of the state, such as temperature or population, etc. So, the map varies in color from time to time with changing property values.
I wanted to use javascript to...
I want to write a javascript to display a outline state map such that different states are filled with different color in a web browser such as IE and FireFox.
What I am thinking is as this:
1st, display blank outline state map as a map (.gif?). Blank outline state map is one that has contour...
It seems to hang forever at writing data to a DataOutputStream associated with a socket connection to a client. "locked at ...".
So, what could cause such block? "Unix Domain Socket" was used. Each write was between 10KB ~ 1MB. Is this because of some buffer problem with socket or something...
A java server seemss to pause for a long time. How to find what it is doing and where it is? Thanks.
The following is exceprt of top -p output:
VIRT RES SHR S %CPU %MEM
638m 339m 11m S 102 9.0
And the following is extracted from stack trace by sending "kill -QUIT" to the program:
"Finalizer"...
I got the following message when one of my perl program exits (it runs multiple threads simultaneously, it has several variable of typess of Thread::Queue and Thread::Semaphore):
Attempt to free unreferenced scalar: SV 0x84f0c00, Perl interpreter: 0x8362c78 during global destruction.
What does...
I have some perl scripts that run N threads. Upon exit of these threads, perl reported the following message:
Scalar leaked: N
what went wrong and how to tell which scalar variables have caused this error message?
Thanks!
I got the error "Wide character in syswrite at ...". syswrite writes data to a socket, which set to binmode. So, what does this error mean since any data written is treated as binary? Thanks.
Calling it "lightweight semantic html tag" may be misleading. But this is what I mean.
In news article analysis applications, it is extremely important to just extract story content text since otherwise the template such as advertisement stuff may have negative impact (e.g. celebrity names...
This may sounds stupid. But is there possibility that we just request the <HEAD> part of a html page from a server? Sometimes, this is good when we only need meta information of a html page. So, instead of downloading the whole page, we just ask for a small number of text.
How threads communicate in perl? For example, if there are 3 threads, A, B, C. C needs to know when A and B finish so that it terminates afterwards. How can C know such status info nicely? I guess there are two ways theoretically. One is gets status info from each other thread. And the other is...
I have a server listening on unix-domain-socket written in java;
I also have 2 clients that write a 2-byte number to the server. One is written in Java. and the other is in Perl (code like $a=chr(0x80); print SOCKET, $a; $a=chr(0x00); print SOCKET, $a).
On the server side, server reads 2 bytes...
For example, say we want to write integer "100" in a binary file, "test.dat". The following code won't work.
$anumber=100;
$file="test.dat";
open(DAT, ">", $file);
print DAT $anumber;
This will write 3 bytes in "test.dat" as 31, 30, and 30. Though, if $anumber is read as "64" in hex from a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.