SSL Socket EOF protocol violation

J

Josh

I'm getting an error I dont understand. Here is the output:

Content-Type: text/html

Traceback (most recent call last):
File "C:\PROGRA~1\APACHE~1\APACHE2\CGI-BIN\test.py", line 12, in ?
s.connect( host, port )
File "<string>", line 1, in connect
TypeError: connect() takes exactly one argument (2 given)
Here is the code:

#!c:/Python23/python.exe

import socket

print "Content-Type: text/html\n\n"

host = "www.paymentsgateway.net"
port = 6051

s = socket.socket( socket.AF_INET, socket.SOCK_STREAM )

s.connect( host, port )

ssl_object = socket.ssl( s );


I don't understand the error, because I think connect takes 2
arguments according to the docs at the python.org site. Thanks for
any help, Josh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top