Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 16 to 27 of 27
  1. #16
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,451
    Hello,

    new actions Socket.SetMaxClients() and Socket.SetPort() added to the plugin as requested. I updated the installer, but if you prefer you can just replace the current files with their updated versions, contained in this zip file.

    Ulrich

  2. #17
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Quote Originally Posted by upeters View Post
    Hello,

    new actions Socket.SetMaxClients() and Socket.SetPort() added to the plugin as requested. I updated the installer, but if you prefer you can just replace the current files with their updated versions, contained in this zip file.

    Ulrich
    Thanks, this is really useful.

    Also, Possibility for a extra argument in Socket.Open?

    Socket.Open(Plugin, Host, IP, Type[SOCKET_UDP/SOCKET_TCP])

    I'm coding a system that connects to my clan's game server bot however, The instructions he's given me and the code I've come up didn't quite match. Could you give me a heads up to what the problem might be?

  3. #18
    Join Date
    May 2006
    Posts
    83
    Is there any way to transfer files with this socket plugin?
    Thanks for all!

  4. #19
    Join Date
    Jul 2007
    Posts
    1,512
    Quote Originally Posted by Vancete View Post
    Is there any way to transfer files with this socket plugin?
    Thanks for all!
    i think if you change it to its code forgot what its called starts with a B lol you
    should be able to but warring even on really good systems give files will lock up ams when sending if i am looking at all this right.

  5. #20
    Join Date
    Jul 2007
    Posts
    1,512
    i been looking at this and i think it will replace my messenger what i have made what used php but what i like to know is how would i set the globle address to a server and if server timed out a view another server so on so forth but also include friends and blocking problem is i am not sure how i would get the server to hold this and also don't know how to use a online server insted of a local server is this possable?

  6. #21
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,451
    Quote Originally Posted by Vancete View Post
    Is there any way to transfer files with this socket plugin?
    Thanks for all!
    Hello,

    the short answer is "yes".

    The long answer is that you must implement your own protocol. The socket is just a mean to exchange data with a remote computer. This data can be anything, like a message of some chat, a command of a certain game, or - why not - a packet that carries part of a file. The problem thing is that you will have to encode the binary file into text first, before you are able to transfer it, because the socket plugin will only handle strings (which cannot contain null characters). So, this is essentially the same that is done when you send an attachment by email: the file is first encoded to plain text (ASCII) before it can be sent out. When your mail reaches the recipient, that text is again converted into binary, and transformed back into the original attachment. This technique is not part of the socket, and you have to write your code to make this happen.

    Ulrich

  7. #22
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,277
    Encrypting it would be a way right? If it's an ASCII based encryption though.

    Quote Originally Posted by upeters View Post
    Hello,

    the short answer is "yes".

    The long answer is that you must implement your own protocol. The socket is just a mean to exchange data with a remote computer. This data can be anything, like a message of some chat, a command of a certain game, or - why not - a packet that carries part of a file. The problem thing is that you will have to encode the binary file into text first, before you are able to transfer it, because the socket plugin will only handle strings (which cannot contain null characters). So, this is essentially the same that is done when you send an attachment by email: the file is first encoded to plain text (ASCII) before it can be sent out. When your mail reaches the recipient, that text is again converted into binary, and transformed back into the original attachment. This technique is not part of the socket, and you have to write your code to make this happen.

    Ulrich
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  8. #23
    Join Date
    Apr 2009
    Posts
    277
    Base64 is ANSCII based

    so use "Crypto.Base64EncodeToString" and then send the string, but i would split large files into sections and add some kind of information structure to the end of the Base64 string to tell the reciver what to do with the file (combine 5 parts etc, filesize, CRC value) so the reciver can rebuild and check the recived file

  9. #24
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,451
    Hello,

    I have updated the plugin a couple of times since I last posted here. It now has support for UDP sockets, three actions have changed slightly (Socket.FindServer(), Socket.GetHostByAddress() and Socket.GetHostByName()), and a new action was added: Socket.Ping().

    With Socket.Ping(), you are now able to send true ICMP echo request packets to a remote computer. The action will return the number of milliseconds to get the answer from the remote host. Normally, all network adapters answer to echo requests, even if there is no service (like HTTP or FTP) running. A link to a small demo showing this new action was included in the documentation.

    As always, the installer can be fetched from my site, but if you prefer you can just replace the current files with their updated versions, contained in this zip file.

    Ulrich

  10. #25
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Quote Originally Posted by upeters View Post
    Hello,

    I have updated the plugin a couple of times since I last posted here. It now has support for UDP sockets, three actions have changed slightly (Socket.FindServer(), Socket.GetHostByAddress() and Socket.GetHostByName()), and a new action was added: Socket.Ping().

    With Socket.Ping(), you are now able to send true ICMP echo request packets to a remote computer. The action will return the number of milliseconds to get the answer from the remote host. Normally, all network adapters answer to echo requests, even if there is no service (like HTTP or FTP) running. A link to a small demo showing this new action was included in the documentation.

    As always, the installer can be fetched from my site, but if you prefer you can just replace the current files with their updated versions, contained in this zip file.

    Ulrich
    In the documentation Socket.FindServer seems to be referencing Socket.Connect which isn't a documentated function?

    Also, The Socket.GetHostByAddress and Socket.GetHostByName examples are in the wrong order.

    I really like this ICMP ping, It's better than running ping using File.Run.

    Thanks!

  11. #26
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,451
    Quote Originally Posted by ShadowUK View Post
    In the documentation Socket.FindServer seems to be referencing Socket.Connect which isn't a documentated function?
    Also, The Socket.GetHostByAddress and Socket.GetHostByName examples are in the wrong order.
    I really like this ICMP ping, It's better than running ping using File.Run.
    Thanks!
    Hello,

    Socket.Connect() was how I called the Socket.Open() function during development. I missed fixing the example code in the help. Thank you, the help is now corrected, and you may use the same links as before if you want to download the updated files.

    I'm glad to hear that you liked the Socket.Ping(). It gave me more trouble than I initially thought.

    Ulrich

  12. #27
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,508
    Been a long time since I've been on the forums and let me just say...OMFG! I have been plaguing the forums with requests for a plugin that does this. Great job Ulrich!

    I was just about to buy reteset's toolbar plugin but I'm going with Ulrich's this time. Next paycheck for the toolbar...sorry reteset. Ur plugin is way cool too...
    Last edited by Centauri Soldier; 05-15-2009 at 12:30 PM.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  13. #28
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Quote Originally Posted by Centauri Soldier View Post
    Been a long time since I've been on the forums and let me just say...OMFG! I have been plaguing the forums with requests for a plugin that does this. Great job Ulrich!

    I was just about to buy reteset's toolbar plugin but I'm going with Ulrich's this time. Next paycheck for the toolbar...sorry reteset. Ur plugin is way cool too...
    I would pay for toolbar but it doesn't look like it would be of any use to me who likes doing it manually. I just got my activation code and I can tell you, This was the most useful thing to come to AMS in a long time.

  14. #29
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    While making an IRC bot, I ran into a problem. The connection needs to be kept alive, but the plugin as far as I can see can't do that. I'm not too sure, It's quite urgent though. Is there a way to have keep-alive?

  15. #30
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,451
    The socket object will not disconnect by itself, and will keep the connection open as long as possible. There is no keep-alive function that could be implemented in the socket itself.

    What does exist, in FTP connections for example, is that the FTP client sends commands by itself to keep the connection alive, like LIST, NOOP, etc. Otherwise, the FTP server could assume that the connection ended and that it did not receive the command for a graceful shutdown from the client, allowing it could close the open connection on the server's end.

    I assume that a similar mechanism would have to be implemented in your IRC client: When nothing is done by the user for x seconds, the client itself would need to send a NOOP message just to signal that the connection is still alive and should not be severed from the server side.

    Ulrich

Similar Threads

  1. FREE : Matrix Object Plugin
    By reteset in forum AutoPlay Media Studio 7.5 Plugins
    Replies: 13
    Last Post: 09-20-2009, 02:37 AM
  2. FREE : Timer Object Plugin
    By reteset in forum AutoPlay Media Studio 7.5 Plugins
    Replies: 29
    Last Post: 04-23-2009, 08:00 AM
  3. Free Plugin: Media Player Object
    By Ted Sullivan in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 09-24-2004, 03:54 PM
  4. INFO: Difference between the Media Player Object and the AVI Object
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-29-2002, 03:15 PM
  5. HOWTO: Make a Media Player Object Go Full Screen
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-23-2002, 12:23 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts