Win32 tcp connect() skeleton

http://leetsys.com/programs/skeletons/win32/connect.c

Very simple example of using winsock to connect to a chosen port. Grabbed most of the source from gandalf’s whois.c, so thank you gandalf. Sends the 3rd command line argument over the socket, prints the data received and then quits. Test it by telneting to an smtp server on port 25 and sending ‘helo whatever.com’, should receive some output back.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: