Advertisement

Sockets in dos... ?

Started by March 12, 2002 06:07 PM
1 comment, last by cybercoder15 22 years, 10 months ago
I had a question: How can I use sockets without winsock or windows related socket libraries. I want to use sockets in DOS. Could someone please refer me to a tutorial? Please email me with a URL at: cybercoder15@yahoo.com Thanks
Um, I wanna say that DOS doesn''t exist anymore, but that''s not completely accurate. As far as Microsoft goes, DOS doesn''t exist.

You can use winsock with a console application. That''s probably the best way to go unless you want to write your own tcpip stack.

Internet programming crash course

Winsock Programmer''s FAQ
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Advertisement
I already saw a berkeley socket implementation for DOS but I don''t think you should use that. Anyway, I don''t understand neither why you''d want to use DOS "socket". Windows has a set of socket call that is somewhat compatible with linux socket calls (if you don''t use any WSA* function). DOS (and I really mean DOS not a console application) does use a set of interrupt call (if I remember well) that is not portable at all. So, despite the fact that the windows winsock.h library could seem to be a pain, it stays a more usefull alternative than use DOS interrupts. Furthermore, DOS interrupts as I said earlier is not compatible with ANY other OS (not even Windows Network). So if your application is a windows console one, you should definitely use winsock.h and not some interrupt stuff (that will probably fail miserably under Windows'' DOS virtual machine).

This topic is closed to new replies.

Advertisement