Hi,
Okay, I'm attempting to create a peer-to-peer chat program that uses
multiple windows. Each window contains a TCPSocket. Since I'm still
on RB 5.2.4, I don't have a ServerSocket, so I'm using a TCPSocket
that hands off each incoming connection to the TCPSocket in a new
window. However, I keep getting 103 errors when I try to connect to
someone, or someone else tries to connect to me. I'm completely at a
loss why this isn't working. Here's the Connection event code of the
TCPSocket that acts as a ServerSocket:
//got a connection, pass it on to a new window
dim w as chat, s as string
s=me.remoteAddress
me.disconnect
me.listen
if findChat(s)=nil then //make sure we don't already have a window
with that address
w=new chat(s) //chat is the chat window with a TCPSocket
end
And the code in the constructor for chat:
// call the Window constructor, or Open events will not fire
Super.Window()
mybuddy=new buddy("",ipin,lanmode) //buddy is a class containing a
nickname, IP, and a boolean
tcp.address=mybuddy.IP
tcp.port=2345
tcp.connect
me.title="Chat with "+mybuddy.IP
Every time a connection out is attempted, a 103 error pops up from
the TCPSocket in the chat window. I'd appreciate any ideas as to what
is wrong and what I can do to fix it. Thanks,
Ben Farhner
CEO / Head Developer
farhnware
http://farhnware.homelinux.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|