TwinSock 1.2 ============ Troy's Windows Sockets Copyright 1994 Troy Rollo Yes, I'm back again. It seems it always takes me two or three goes to hand projects over. Unless somebody volunteers to take this over now, and has the time to do it, this will be the last version until at least late January. - Troy What is TwinSock? ----------------- TwinSock is a free implementation of proxy sockets for Windows. Other Windows Sockets drivers use a network card, or a well known Internet over serial lines protocol, such as SLIP, C-SLIP or PPP. These drivers may access the network card or communications card directly, or via a VxD or DOS based TCP/IP stack. their uses are limited to cases where either the machine is directly connected to a network, or the host at the other end of the phone line supports the same serial line internet protocol. The other shortcoming of these drivers is that they require an official IP address to operate, and frequently you will not be able to connect very far beyond the host you connect directly to. TwinSock, on the other hand, makes use of the IP address of the host to provide socket services to the client. When an application running under Windows requests socket services of TwinSock, TwinSock will transparently pass these requests on to the TwinSock Host program running on the remote machine for processing. The result is that you have all the same networking capabilities as you would if your Windows machine were physically connected to the network in place of the host machine. For more information on what TwinSock can do for you, read on, or refer to one of the following newsgroups, where TwinSock is discussed: alt.dcomp.slip-emulators comp.os.ms-windows.networking.tcp-ip comp.os.ms-windows.apps.comm Licensing --------- TwinSock is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Installing ---------- 1. Copy WINSOCK.DLL and TWINSOCK.EXE to your Windows directory. 2. Copy the following files to an empty directory on your UNIX host. build.sh commands.c mem.c packet.c packet.h term.c tshost.c twinsock.h tx.h wserror.h 3. Type "sh build.sh" to build the server. build.sh will attempt to figure out what options it needs to use to compile on most 32 bit systems. 64 bit systems may need significant porting work. If it doesn't compile first off, try to modify it until it does if you know enough about programming. The files you will probably need to touch are (in decreasing order of probability): term.c tshost.c commands.c You should avoid touching packet.c if possible. 4. Start the TwinSock client. You may get a message indicating that COM1 could not be opened, followed by a box asking you to configure the communications port. If you do not, select Setup...Communications. Select your communications parameters, and click "OK". 5. You will now be in TwinSock terminal mode. Type "Enter" a few times and you should see your UNIX prompt. Start "tshost", the TwinSock Host program. TwinSock should iconise and change its title to "Twinsock - Connected". At this point you can start your Windows sockets applications. Shutting down ------------- 1. Double click on the TwinSock icon. 2. Select Setup...Disconnect from the menu. 3. If TwinSock host does not shut down, wait 5 seconds, then type ^X five times. Enhancements and Bug Reports ---------------------------- Enhancements and bug reports should be directed to: twinsock@cbme.unsw.EDU.AU TODO & BUGS ----------- The protocol used over the serial connection converts everything to base 64 using the characters A-Z, a-z, '.' and '/' in order to get past the most obstinate terminal servers. This is probably overkill in almost all cases, and there should be an option to fix this. Out Of Band data should be handled properly. The internals don't clean up properly if an application exits without cleaning up itself. TwinSock Host should be ported to more hosts, including non UNIX hosts. There should be a facility to script logins so all you have to do is hit the TwinSock icon in the Program Manager. There's appears to be an undefined dynalink in there somewhere. History ------- 05-Nov-1994 Project initiated 14-Nov-1994 Version 1.0 released 20-Nov-1994 Version 1.1 released 04-Dec-1994 Version 1.2 released Changes in version 1.1 ---------------------- This version includes a number of bug fixes and usability enhancements. Bugs fixed from 1.0: Most of the WSAGetXbyY functions didn't work at all. Telnet applications won't drop typed characters anymore. New features: The host end now tries to figure out what it needs to do to compile on your system. This ability is probably not complete yet, but should work for most 32 bit UNIX platforms. Now has a terminal interface. This means you can log in to your host and start TwinSock Host without needing a separate terminal program. Data received from the network is now "streamed" this means that if you are in the middle of a long file transfer, you can still get in to do other things while the transfer is still going. Also, when you abort a connection, the unwanted data is discarded at the host end. TwinSock Host now sends a character sequence to TwinSock, which then automatically initiates the connection automatically. Changes in version 1.2 ---------------------- Bugs fixed from 1.1: A number of bugs to do with byte swapping have been fixed. Thanks go to Jim Reuter of DEC for his detective work on this. The setsockopt calls have been changed to have the last argument not passed by address. This was my error, not a SysV/POSIX/BSD difference as many have speculated. Behaviour changes: The default line settings have changed. TwinSock now uses DSR for handshaking. This can be changed back to the old behaviour by adding the line "OutxDsrFlow=0" to the config section of TWINSOCK.INI build.sh should now detect "-lnsl" and shouldn't incorrectly include mem.o in the compilation when using gcc (which has built-in prototypes). New features: The one packet positive Ack protocol has been changed to a four packet windowed protocol. This improves speed by a factor of four (no, making it an 8 packet windowed protocol will not give an 8 times improvement). You can now dial the modem from the menu, if you're averse to entering dial commands yourself. The dialing code will remember your most recently dialled number, so for most people this means dialing will be a simple matter of selecting Setup...Dial...OK (after the first time). There is now a menu option to send a break signal (Setup...Send Break Signal). The break signal will last for 1.5 seconds.