KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Kixforms Sockets : Discussion
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon Aug 02, 2004 8:26 pm    Post subject: Kixforms Sockets : Discussion Reply with quote

Since this seems to be an interesting and popular subject, thought I would open-up another thread on it. I posted the current working copies of SocketListener (sl.kix) and SocketCommander (sc.kix) at the following location.

sockets

Requires the latest dev. build here

kixforms 45

Just dont forget to change the following line in the SocketListener script, change it to your Internet IP address of the machine running the listener.

$listener.address = "69.158.97.39"

-Shawn


Last edited by Shawn on Mon Aug 02, 2004 10:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Mon Aug 02, 2004 9:13 pm    Post subject: Reply with quote

Just have to say that after I had some non-msn communication with Shawn :

KiXtart.Socket KiX A$$ !!!11!!!!111

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Tue Aug 03, 2004 3:17 am    Post subject: Reply with quote

hey, wtf!
I've missed something too huge!!!

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Bryce
KiXforms Supporter
KiXforms Supporter


Joined: 26 Mar 2003
Posts: 69

PostPosted: Tue Aug 03, 2004 4:01 pm    Post subject: Reply with quote

ok, i had some time to play with this....

oh my freaking god!!! this is going to KiX mucho ass!! Very Happy
Back to top
View user's profile Send private message
Bonji
KiXforms Aficionado
KiXforms Aficionado


Joined: 10 Mar 2003
Posts: 393
Location: Virginia

PostPosted: Tue Aug 03, 2004 6:57 pm    Post subject: Reply with quote

Shawn,

When I query .Address it always returns "127.0.0.1" and .Port always returns "0".

Also, are there any other properties I can pull out of the socket object?

Thanks!

_________________
-Ben
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Aug 03, 2004 7:25 pm    Post subject: Reply with quote

Let me check into this Ben, will get back to you.

Don't forget, these propertiy names will probably be changing soon - I'm hoping YOU and the other interested members can help me flesh this socket stuff out. You have much more experience with this stuff than I do.
Back to top
View user's profile Send private message
Bonji
KiXforms Aficionado
KiXforms Aficionado


Joined: 10 Mar 2003
Posts: 393
Location: Virginia

PostPosted: Tue Aug 03, 2004 7:36 pm    Post subject: Reply with quote

No problem on the name changes. Very much under development at this time I know.

I remember seeing references to .localaddress and .remoteaddress as well as .localport and .remoteport. Of course, it can get confusing if you're not sure where the point of reference is from when checking these properties on a socket.

The above information is helpful to know what IP address/port the client thinks it is connecting to as it could be different from the server's local address/port (i.e. server's internet accessible address/port).

_________________
-Ben
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Aug 03, 2004 7:50 pm    Post subject: Reply with quote

Do you remember if SocketWrench had a stand-alone CHM file - know they have the online help stuff, any CHM you have seen ?
Back to top
View user's profile Send private message
Chris S.
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 05 Mar 2003
Posts: 241

PostPosted: Tue Aug 03, 2004 8:25 pm    Post subject: Reply with quote

Shawn wrote:
Do you remember if SocketWrench had a stand-alone CHM file - know they have the online help stuff, any CHM you have seen ?


Give this a go...

http://www.catalyst.com/support/help/cstools3/visual/help.html
Back to top
View user's profile Send private message MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Aug 03, 2004 10:28 pm    Post subject: Reply with quote

Thanks Chris, using your link in a round-about way, i found the chm, i posted it here:

SocketWrench Help

If I could, for those that are interest, please read the section entitled "Programming with SocketTools" and check-out the interface examples ... let me know what you think ...
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Aug 03, 2004 10:34 pm    Post subject: Reply with quote

One of the things I'm looking at now, is errors and exceptions. SocketWrench uses the method return value to gives errors. If we do that, then we would have to "silence" all the method calls, like this:

$= $Socket.Connect()

the flip side is that we CAN check for errors if we want to, like this:

If $Socket.Connect() = 0

; Ok ...

Endif

The other option is to return COM errors, but they are a bit of a bitch to work with. COM uses those weird 0x8000xxxx type errors ... the other option is to maybe expose a System.Error and System.SError property, that will return the last error ...

-Shawn
Back to top
View user's profile Send private message
Bonji
KiXforms Aficionado
KiXforms Aficionado


Joined: 10 Mar 2003
Posts: 393
Location: Virginia

PostPosted: Tue Aug 03, 2004 11:36 pm    Post subject: Reply with quote

I like the Socketwrench method personally. I am used to silencing those types of calls, and I think it gives more flexibility with coding.
_________________
-Ben
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Wed Aug 04, 2004 7:48 am    Post subject: Reply with quote

Much more flexibility me thinks...

Go for it Very Happy

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed Aug 04, 2004 12:21 pm    Post subject: Reply with quote

ok ... I have blocking and non-blocking sockets working now. interesting thing though, think we will still need something like System.Error (kinda like System.EventObject) to support non-blocking sockets. The reason is, when a non-blocking event is entered, need someway to get the error code that may have been generated in the event. Right now I am using this System.Error idea but I noticed that SocketWrench has something called the "LastError" property - which performs a similar function.

Oh yeah - the other thing is - need to determine what the "default" blocking mode will be, when a socket is created. winsock defaults the mode to blocking, not sure about SocketWrench yet. Whatcha think ?

-Shawn
Back to top
View user's profile Send private message
Bonji
KiXforms Aficionado
KiXforms Aficionado


Joined: 10 Mar 2003
Posts: 393
Location: Virginia

PostPosted: Wed Aug 04, 2004 12:25 pm    Post subject: Reply with quote

I would prefer non-blocking be the default. It's a little easier to recover from having non-blocking by mistake than having blocking by mistake. Also, I would imagine non-blocking would be the one used the most.

Just my 2 cents.

_________________
-Ben
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group