I wrote this code:
import urllib
proxies = {'http': 'http://112.65.135.54:8080/'}
opener = urllib.FancyURLopener(proxies)
r = opener.open("http://www.python.org/")
print r.read()
and when I execute it this program works fine, and send for me source code of python.org But when i use this:
import urllib
proxies = {'http': 'http://80...
We have a c# (3.5 framework) socket server which is a console app, after about 3000 connections (or less, it's quite random), we get an unhandled exception which crashes the app completely.
We're really struggling to find out what's happening and where, the only info we get is below, can anyone shed any light? It should be noted that EV...
I'm following the the tutorial on PyGTK socket where you embed a xterm window to another application.
I downloaded the file from here: http://www.pygtk.org/pygtk2tutorial/examples/socket.py
When I run it following this: http://faq.pygtk.org/index.py?req=show&file=faq19.015.htp I get two different results:
On Ubuntu Karmic Koala ...
Hi,
I have a problem with my socket program.
I create the client program (my code is below)
I have a problem when i close the socket with the disconnect method.
Can i help me?
Thanks and sorry for my English XP
CFSocketRef s;
-(void)CreaConnessione
{
CFSocketError errore;
struct sockaddr_in...
Hello Experts,
I would be greatful for help, understanding how long it takes to establish a TCP connection when I have the Ping RoundTripTip:
According to Wikipedia a TCP Connection will be established in three steps:
1.SYN-SENT (=>CLIENT TO SERVER)
2.SYN/ACK-RECEIVED (=>SERVER TO CLIENT)
3.ACK-SENT (=>CLIENT TO SERVER)
My Question...
I have a fairly complex project that boils down to a simple Client / Server communicating through object streams.
Everything works flawlessly for two consecutive connections (I connect once, work, disconnect, then connect again, work, and disconnect). The client connects, does its business, and then closes. The server successfully close...
Are there any 'good' ways to cause a thread waiting on a recvfrom() call to become unblocked and return with an error?
The motivation for this is to write unit tests for a system which includes a unit that reads UDP datagrams. One of the branches handles errors on the recvfrom call itself. The code isn't required to distinguish between...
I'm trying to make a simple echo client and server that uses Unix sockets. In this example, the connection seems to be unidirectional. The server can receive data from the client, but it can't send the data back. If I use tcp connections instead, it works great. Does anyone know what's wrong?
Server
package main
import "net"
import "f...
Hi,
I am trying to send a file through a java socket and receive it through another. However, this happens:
Send Content:
/*
This is simply a file to transfer
*/
Received:
so basically I cannot escape the received content on stack overflow. It is basically a bunch of unreadable bytes (about 32 bytes worth) and then the message I sen...
I'm a real newbie to java, so please excuse me if this is a hopelessly straightforward problem.
I have the following from my java game server:
// Get input from the client
DataInputStream in = new DataInputStream (server.getInputStream());
PrintStream out = new PrintStream(server.getOutputStream());
disconnect=false;
w...
i wrote this code :
import random
import sys
import urllib
openfile = open(sys.argv[1]).readlines()
c = random.choice(openfile)
i = 0
while i < 5:
i=i+1
c = random.choice(openfile)
proxies = {'http': c}
opener = urllib.FancyURLopener(proxies).open("http://whatismyip.com.au/").read()
::: I put 3 proxy in a txt file . :
http://211...
Is it possible to create a simple server in Java that returns a response based on a given key?
So it would be a simple program, that stores a hashmap and returns the result based on a key provided by the client.
What would be the fasted implementation, to have it over HTTP or a socket? The client will be a web based application.
...
I trying to realize rtsp over http. i have a problem with connection to RTSP camera. Maybe, someone can help me?
Thanks.
...
I'm trying to write a simple program that will receive a string of max 20 characters and print that string to the screen.
The code compiles, but I get a bind() failed: 10038. After looking up the error number on msdn (socket operation on nonsocket), I changed some code from
int sock;
to
SOCKET sock
which shouldn't make a differe...
I have the following problem:
Program 1 has a huge amount of data, say 10GB. The data in question consists of large integer- and double-arrays.
Program 2 has 1..n MPI processes that use tiles of this data to compute results.
How can I send the data from program 1 to the MPI Processes?
Using File I/O is out of question. The compute no...
Hi,
I am working on an iPhone game which is depended on a LAMP server. I want to create a "event" based system where the apache server sends an event to the iphone.
For this, I am thinking of using "CFStreamCreatePairWithSocketToHost" to connect to port 80 of the apache server.
I am able to successfully connect to the server and open...
I have a LAMP server running. External services connect to this server (services running on iPhone).
I want, from a php script, to get a list of all the services that have connected to the Apache server... How do I do it? Should I use fsockopen?
Any help would be greatly appreciated.
...
I'm developing an Asynchronous Game Server using .Net Socket Asynchronous Model( BeginAccept/EndAccept...etc.)
The problem I'm facing is described like that:
When I have only one client connected, the server response time is very fast but once a second client connects, the server response time increases too much.
I've measured the time...
I'm trying to write a simple socket-based client in Python that will connect to a telnet server. I can test the server by telnetting to its port (5007), and entering text. It responds with a NAK (error) or an AK (success), sometimes accompanied by other text. Seems very simple.
I wrote a client to connect and communicate with the ser...
Hey all, I'm using select() to recv() messages from server, using TCP/IP. When I send() messages from the server, it returns a reasonable number of bytes, saying it's sent successful. And it does get to the client successfully when I use while loop to just recv(). Everything is fine and dandy.
while(1)
recv() // obviously pseudocode...