in reply to Re^2: Client/Server sockets with TK on Win32
in thread Client/Server sockets with TK on Win32

there are two text boxes at the bottom of each window taking an input. This text input "should" be passed from client/server

I appreciate that. All I said was that the connection is established.

In contradiction to the claim in the OP -- "however when I try and port over to windows I just can't get the client to connect to server. " -- the the client *does connect to the server*.

However, beyond that I don't know enough about Tk fileevents to debug the rest of the code. I can see from reading the POD that it says

"However, there may be at most one readable and one writable handler for a file at a given time in a given interpreter. If fileevent is called when the specified handler already exists in the invoking interpreter, the new callback replaces the old one."
-- which means that even if teh code "works on Linux", it is broken as posted.

The POD also says:

"Event-driven I/O works best for filehandles that have been placed into nonblocking mode. In blocking mode, a print command may block if you give it more data than the underlying file or device can accept, and a <>, sysread or read command will block if you attempt to read more data than is ready; no events will be processed while the commands block. In nonblocking mode print, <>, sysread and read never block. See the documentation for the individual commands for information on how they handle blocking and nonblocking filehandles."
-- which suggests that it probably isn't "working on Linux" as posted.

The POD also says:

"BUGS

On windows platforms fileevent is limited in the types of filehandles that behave correctly. Making filefhandles non-blocking is only implemented on a subset of UNIX platforms (see the Tk::IO manpage).

-- which further suggests that the code as posted is broken.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

  • Comment on Re^3: Client/Server sockets with TK on Win32