473,698 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting error in socket connection

hi,
i have written a simple socket program in python to connect to a
windows machine.On the server side i am running a windows socket
program which works perfectly fine,my server program waites at
accept() for a connection to be established.on the client side however
i am not able to connect and am getting an error "10061 connection
refused".the code was directly downloaded from sites.
here is the code for client side:

import socket

try:
s = socket.socket(s ocket.AF_INET, socket.SOCK_STR EAM)
except socket.error:
print 'socket not creadted'
try:
s.connect(("130 .10.5.38", 9999))
except socket.error,ms g:
print 'error in connect'

#s.send('Hello, world')
#data = s.recv(1024)
s.close()
#print 'Received', `data`

i am getting this error on debugging.Can anyone tell what the problem
could be?or is it that i will not be able to connect to awindows
machine or some funda like that.
pls help.
KRA.
Jul 18 '05 #1
0 2237

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
6368
by: Martin | last post by:
I am a PHP newbie (just got my "Hello World" page working this morning). I'm doing some R&D work to see if PHP is viable for a situation I have. To accomplish what I want to do, I have to have the PHP page communicate directly with another process. I want the PHP script to establish a socket connection to the other process, send a message and receive some data back which would then used for calculations and/or display on the resulting...
6
5481
by: Rune | last post by:
Hi, I've written a very simple 'kill-server' to help me shut down processes through Telnet or HTTP. The kill-server is a function and is launched as a thread. I use the module socket.py on Python v2.3 (Windows) I can use telnet host:port and enter the secret killword or use a broser with http://host:port/secret_killword The 'kill-server' validates the secret_killword and writes a file
0
2681
by: christian_stengel | last post by:
Hi *, I have just started to learn python and I am having a problem with an python client connecting to a perl server using ssl (I tried this with pyOpenSSL and with the build in SSL Module). I don't want to check a cerificate, so i simply tried a from OpenSSL import SSL
4
4571
by: anonymous_c | last post by:
Hey guys. I'm creating a file transfer app. Anyways, I'm using this code... SERVER <code>Dim Hostname As String = Dns.GetHostName Dim IP As String = Dns.GetHostByName(Hostname).AddressList(0).ToString Public Sub RunServer() Dim listener As TcpListener
0
3713
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) : base(message){} public FtpException(string message, Exception innerException) : base(message,innerException){}
9
6808
by: Henrik | last post by:
I'm developing an application that uses two threads to communicate with two different devices on my network. One of the devices is reached through an API from the supplier of that device. The API has support for detecting when the connection to the device is lost and signal back to my application. When I use this whitout starting the other thread everything works fine. The problem occurs when I start the other thread where the following...
0
5890
by: kuguy | last post by:
Hi all, I'm new to the forums, so I hope this isn't in the wrong place... I have that "Software caused connection abort: socket write error" exception error that i've never meet before. Basically what im trying to do is the following: - a client connect to a server using sslsocket. - server receive the connection and reply with the first part of the data and keep the connection open. - then client receive the reply and request for...
0
1726
by: Jesper | last post by:
We have a .NET 2.0 desktop application which sends and receives network packets over UDP. Several users have reported an occasional socket error 10052 which happens when the code calls socket.BeginReceiveFrom on a the UDP socket. What does this mean? The official MS documentation for socket error 10052 says - quote: "WSAENETRESET (10052) Network dropped connection on reset . The connection
0
5122
by: Xionbox | last post by:
Hello everybody, The error I have seems very easy to solve, but for some odd reason I can't seem to solve it. Anyways, here's my "setup". I created a server running on localhost:1200 (telnet localhost 1200 proves that it is up and running) and I coded a client which is supposed to connect to that server and send it data. The odd part is that the client connects to the server (via connect()) without any problem, but three lines later, it...
0
8601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9021
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4365
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.