Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / RSocket

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. RSocket
#826
Posted by: 2003-03-27 01:47:34
Hey, I have been trying to use this Rsocket, every time I try to connect to something, I get the error 10038, "Socket operation on nonsocket." What am I doing wrong here, how do I fix it?
Message2. Re: RSocket
#828
Posted by: guidance 2003-03-27 22:23:42
Do you mean the demo code or your owns?
Message3. Re: RSocket
#829
Posted by: 2003-03-28 01:15:18
I mean on my code. Is there any documentation on this Rsocket? If so, you should add the link on the source code page. Oh, also wanted to say, dude, you have a COOL site!
Message4. Re: RSocket
#830
Posted by: guidance 2003-03-28 08:52:30
Did you try in-site search of "rsocket" here?

I'll move source codes in "Example" folder to "Upload" folder gradually, I won't put the link in this message, please find them out by yourself. :)

Happy to know I'm doing something useful to others, thanks!
Message5. Re: RSocket
#834
Posted by: 2003-04-01 13:43:43
Yes, there is documentation.  Look at the files in Rsocket.zip.  It is quite detailed.  I could help, maybe, if you posted the code that does not work.  My examples work, you should follow them and use the same syntax.  In programming, syntax is everything.... almost :-)  Take care, doc
P.S.  If your code doesn't work, who can say much without seeing the part that doesn't work?  Show us your connect statement and where you define the arguments it uses.  I guess the error you get is because you failed to call the .S function to define a socket handle (called socket number in some RQ literature).  That function returns a value you must save and use in .connect statements.  If your socket is nonblocking, there will always be an error in .connect, because it is impossible to connect in the time that the program returns a value.  The key is what kind of error is returned.  All of this is explained in the doc that comes with rsocket.zip.
Probably Guidance has the latest version, but you can always check my site on that by looking at the last modified date.
Http://www.angelfire.com/space/netcensus/
Message6. Re: RSocket
#837
Posted by: 2003-04-02 08:54:35
It's just a simple connect command, and I am getting the SockNum to return the message needed. I am tyring to connect to a server on my own computer, from my own computer. Is it possable this componet cannot do this to/from local host? I have tried both "localhost" and the ip, but nither works.  here is a sample of it...

SUB ConnectCoolBtn1Click
 If ConnectComboBox1.Text = "" THEN
  ConnectComboBox1.Text = Sock.gethostip
 END IF
  sNum = Sock.Connect(ConnectComboBox1.Text, 1450, Len(ConnectComboBox1.Text))
  IF sNum > 0 THEN 
    sTime.Enabled = 1
    RichEdit1.Addstrings(DeCode(Sock.Readline(sNum)))
  ELSE
    sNum = 0
    ShowMessage "Unable to connect!" + Chr$(13) + Sock.LastError
  END IF
  ConnectCoolBtn2Click
END SUB
Message7. Re: RSocket
#838
Posted by: 2003-04-02 10:03:50
Eddie, I don't see where you dimension sock as ??? Qsocket or Rsocket?
Your connect statement is wrong in either case.
For DIM Sock as Qsocket, Sock.Connect(host$,port%).  Just two arguments.
For $INCLUDE "rsocket.inc" and DIM Sock as Rsocket
it is
Dim S as LONG
S=Sock.S
Sock.connect(S,host$,port%) 'three arguments
You do neither of the above, that's your problem.  You can connect to host 127.0.0.1 which is your own computer and any listening port.
Take care, doc
Message8. Re: RSocket
#840
Posted by: 2003-04-03 09:19:00
I dimmed it, near the top of the code, that was just the problem part.
I know how to use the rapidq socket, i just don't want to. OK, I understand it now, thanks guys, you're the coolest!!!
Message9. Re: RSocket
#841
Posted by: 2003-04-03 22:18:13
Duse, It's totaly still not working for me. No matter what I try, I still get the same message. I have run through this code till my head is spinning man. All it gives me is that 10038 message. Socket operation on nonsocket or somehting like that, makes no sense to me.
Message10. Re: RSocket
#877
Posted by: 2003-04-27 12:11:19
Zip your code and send it to me; maybe I will see the problem.
Message11. upload/tmp
#878
Posted by: guidance 2003-04-27 15:11:17
rapidq/upload/tmp folder could be used as this purpose:

http://g.yi.org/_scripts/file.php?f=1992&r=2330
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-4-20  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0