hello python gurus
I would like to establish a socket connection to a server running a service
on port 29999. the host address is 10.214.109.50. how do i do this using
python?
many thanks 6 1549
JudgeDread wrote: hello python gurus
I would like to establish a socket connection to a server running a service on port 29999. the host address is 10.214.109.50. how do i do this using python?
many thanks
Off the top of my head (so there could be errors):
import socket
s = socket.Socket()
s.connect((10.2 14.109.50, 29999))
s.send("Hello, Mum\r\n")
That should point you in the right direction, anyway.
There is a higher level socket framework called twisted that
everyone seems to like. It may be worth looking at that too -
haven't got round to it myself yet.
Steve
Steve Horsley wrote: JudgeDread wrote:
hello python gurus
I would like to establish a socket connection to a server running a service on port 29999. the host address is 10.214.109.50. how do i do this using python?
many thanks
Off the top of my head (so there could be errors):
import socket s = socket.Socket() s.connect((10.2 14.109.50, 29999)) s.send("Hello, Mum\r\n")
That should point you in the right direction, anyway.
There is a higher level socket framework called twisted that everyone seems to like. It may be worth looking at that too - haven't got round to it myself yet.
Steve
Just curious...where do these messages show up @10.214.109.50?
andre
--
Nothing is easier than being busy -
and nothing more difficult than being effective.
On 2005-06-30, André Egners <an**********@r wth-aachen.de> wrote: I would like to establish a socket connection to a server running a service on port 29999. the host address is 10.214.109.50. how do i do this using python?
many thanks
Off the top of my head (so there could be errors):
import socket s = socket.Socket() s.connect((10.2 14.109.50, 29999)) s.send("Hello, Mum\r\n")
Just curious...where do these messages show up @10.214.109.50?
Um, at port 29999?
--
Grant Edwards grante Yow! does your DRESSING
at ROOM have enough ASPARAGUS?
visi.com
Steve Horsley wrote: There is a higher level socket framework called twisted that everyone seems to like. It may be worth looking at that too - haven't got round to it myself yet.
I wouldn't say 'like,' exactly. I've cursed it an awful lot (mostly for
being nonobvious), but it does a damn fine job at networking, especially
if you're comfortable building your own protocols.
Christopher Subich wrote: Steve Horsley wrote:
There is a higher level socket framework called twisted that everyone seems to like. It may be worth looking at that too - haven't got round to it myself yet.
I wouldn't say 'like,' exactly. I've cursed it an awful lot (mostly for being nonobvious), but it does a damn fine job at networking, especially if you're comfortable building your own protocols.
If you want a communication library that *is* obvious and easy to use,
try Pyro http://pyro.sourceforge.net
--Irmen This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Fortepianissimo |
last post by:
Here is the situation: I want my server started up upon connection.
When the first connection comes in, the server is not running. The
client realizes the fact, and then starts up the server and tries to
connect again. This of course all happens on the same machine (local
connection only).
The connections can come in as fast as 30+/sec, so the server is
threaded (using SocketServer.ThreadingTCPServer). Further, the server
initialization...
|
by: Dicky Cheng |
last post by:
Hi,
I am using .net remoting technology. I set up a .net remoting client and
server in IIS. When the client calls the server, the server will run a long
duration method (30-60seconds). I have a test on it that if the network
broken at the time the client have already send the remoting request and
waiting for the server, the client side will wait infinitely by default,
even if i already set the executionTimeout to 90seconds in...
|
by: Fred Zuckerman |
last post by:
Hello All,
After reading in this group about the preference for connecting to a SQL
Server using a connection string instead of a DSN file, I have done just
that.
BUT, I cannot update my data. I have gone back and forth between using a DSN
file and a DSN-less connection string and I have found the following issue.
When I utilize the DSN file to create the link, there is a step where it
asks me to identify a unique key for the file. If I...
|
by: RKay |
last post by:
I have a Win2k server running SQL Server 2000. On that box I built a
working web service that pulls data from the database. One of the
services available simply accepts an ado.net connection string to test
if a connection can be made to the local server. I can call that web
service from any box on my network, and with the correct connection
string, I can establish a connection to the database.
However, when I copy the exact same service...
|
by: Suresh |
last post by:
Hi Guys
I have Db2 server installed on remote server. i am connecting to that
remote server by using VPN.
I want to connect that remote DB2 server instance using my local
machine DB2 development client. Bur Its gives me following error
message. I searched lots of things on net and tried on remote server
but i didnt got suceess. Can any one tell me how to set TCP\IP
connection protocol on server for particular instance. Becuase I think
| |
by: Marcus |
last post by:
I have a function that simply returns TRUE if it can connect to a
particular Sql Server 2005 express, or FALSE if it cannot. I am getting
some strange error codes returned when the computer that sql server
resides on is not reachable. The error is different depending on the
connection string that I use. If I use the following connection string:
"server=192.1.1.1; Initial Catalog=master; uid=The_User;
password=The_Password; Connect...
|
by: _DD |
last post by:
I'd like to include a 'Test Connection' button in an app, for testing
validity of a SQL connection string. I'd prefer to keep the timeout
low. What is the conventional way of doing this?
|
by: Anil Gupte |
last post by:
I am using the following to try to connect to the database, but it does not
seem to be working.
Dim sConnString
sConnString = "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=MediaDB;Data Source=MEDIAMACHINE\SQLEXPRESS"
Connection.Open sConnString
Dim Recordset
Set Recordset=Server.CreateObject("ADODB.Recordset")
|
by: alex |
last post by:
I've converted a latin1 database I have to utf8. The process has been:
# mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore
--skip-set-charset mydb mydb.sql
# iconv -f ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql
mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |