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 II
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Lonkero
KiXforms Devotee
KiXforms Devotee


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

PostPosted: Fri Aug 06, 2004 6:36 pm    Post subject: Reply with quote

I still think the connection is not that flat.
first you create a listener, once a connection is received, you accept it to a socket.
at this point, you can control do you enable the connection or disconnect or leave it there.

this is basically exactly the same as firewalls do.

oh, and me talking about winsock2, de facto socket of windows world to this date.

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


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

PostPosted: Fri Aug 06, 2004 6:37 pm    Post subject: Reply with quote

and still, I wish someone else can say something about the event names.
I think they are totally messed up and need correction.

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


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Aug 06, 2004 6:49 pm    Post subject: Reply with quote

We can talk about event names ... I know for a fact (looking under the covers) that once the listener accepts an incomming socket, the client is connected., and sees it as a successful connection. Think the idea of doing an early handshake of some kind is a good one - kinda like "do you really want to talk to me?" ... but not required because the listener can just disconnect if it doesn't want to talk - not the most gracefull arrangement, but software doesn't have feelings that can be hurt ...

Here's my new analogy ...

[phone rings, Shawn answers it]

Shawn: Hello, this is Shawn.

Jooel: Hey Shawn, This is your buddy Jooel from Finland.

Shawn (thinks): I'm not talking to that Basta! then click! (hangs up the phone)

Jooel (thinks): wtf ! The bastard hung-up on me!
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


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

PostPosted: Fri Aug 06, 2004 7:11 pm    Post subject: Reply with quote

there must be phonenumber delivered by the socket.
either by the listener or by the accept function BEFORE connection establishment, that's a fact.

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


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

PostPosted: Fri Aug 06, 2004 7:19 pm    Post subject: Reply with quote

shawn, look at socketOptions:
Quote:
SO_CONDITIONAL_ACCEPT BOOL Enables sockets to delay the acknowledgment of a connection until after the WSAAccept condition function is called.

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


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

PostPosted: Fri Aug 06, 2004 8:29 pm    Post subject: Reply with quote

as I don't get any comment on socket names...
was thinking about making a poll for it but then...
I think I will make my own socket library if everyone is just sleeping, they will propably just use which ever gets first under their nose...

getting coding, just look for socket-library dll on korg.

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


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Aug 06, 2004 11:08 pm    Post subject: Reply with quote

ok, keeping this low-key but i posted the latest dev. build to the usual place ... didn't get as much done as I wanted to - because that queuing of event thing took some time. But hoping that this build fixes a few things and performs better ... please give a go and advise ...

the scipt included is called KIM.KIX - Kixtart Instant Messenger Surprised) but please understand, this is not anything like a real instant messenger - just playing with concepts and ideas - it really an ECHO client and server all in one.

will post more comments soon ...
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Aug 06, 2004 11:28 pm    Post subject: Reply with quote

before i forget, for those using NON-BLOCKING sockets - you must set the BLOCKING property = 0 to get back into non-blocking mode. the Blocking mode is enabled by default for anyone wanting to play with that.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Aug 06, 2004 11:38 pm    Post subject: Reply with quote

Ben - that crash problem is still there - working on it now.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Aug 06, 2004 11:49 pm    Post subject: Reply with quote

ok, yet another new build posted ...
Back to top
View user's profile Send private message
Bonji
KiXforms Aficionado
KiXforms Aficionado


Joined: 10 Mar 2003
Posts: 393
Location: Virginia

PostPosted: Fri Aug 06, 2004 11:51 pm    Post subject: Reply with quote

I'm struggling to get the new version working. The server doesn't seem to be triggering any events. I'm going to grab the new build and try it.
_________________
-Ben
Back to top
View user's profile Send private message
Bonji
KiXforms Aficionado
KiXforms Aficionado


Joined: 10 Mar 2003
Posts: 393
Location: Virginia

PostPosted: Fri Aug 06, 2004 11:55 pm    Post subject: Reply with quote

Shawn,

Tell me if this logic is flawed, or if there is a better way to check for events. I just now put this together to try to figure out what is going on.

Code:

WHILE $FORM.VISIBLE
     DIM $TMP
     $TMP = $FORM.DOEVENTS
     $ = MESSAGEBOX($TMP,"SERVER")
     $ = EXECUTE($TMP)
LOOP


I've never tried working with these events directly before, and I'm guessing some events may not be strings.

_________________
-Ben


Last edited by Bonji on Fri Aug 06, 2004 11:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Aug 06, 2004 11:55 pm    Post subject: Reply with quote

Make sure to go into non-blocking mode with Blocking = 0 - for both the listener and the accepted clients ...
Back to top
View user's profile Send private message
Bonji
KiXforms Aficionado
KiXforms Aficionado


Joined: 10 Mar 2003
Posts: 393
Location: Virginia

PostPosted: Fri Aug 06, 2004 11:56 pm    Post subject: Reply with quote

Yeah, I changed them to 0. I'm using a telnet client to verify the connection, and it connects but does not receive anything back.

By the way, your script works fine. It's my echo scripts that are not working.

_________________
-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: Fri Aug 06, 2004 11:59 pm    Post subject: Reply with quote

well, some of the returned events may not be strings ...
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 Previous  1, 2, 3, 4  Next
Page 2 of 4

 
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