porting socket ssl python to c++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi guys, i'm with a newbie question


i have this piece of code, but i'm not finding something similar with c++, could anyone help? thanks:


import socket
import ssl
import sys
if len(sys.argv) == 3:
HOST = sys.argv[1] # IP
PORT = int(sys.argv[2]) # Port
else:
print "USAGE: $python client_ssl.py <server_ip> <port>"
exit(1)
print 'Connecting...'
s = socket.create_connection((HOST, PORT))
s = ssl.wrap_socket(s)
print "Connected!\n"
while True:
query = raw_input("Query: ")
if ( query == "quit" ):
break
s.send(query)
data = "" style="color:rgb(0,0,255)">16384)
print 'Reply:', data
s.close()



--
Roberto Spadim
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux