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
Announcement
Collapse
No announcement yet.
Socket Object Plugin
Collapse
X
-
Encrypting it would be a way right? If it's an ASCII based encryption though.
Originally posted by upeters View PostHello,
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
Leave a comment:
-
Hello,Originally posted by Vancete View PostIs there any way to transfer files with this socket plugin?
Thanks for all!
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
Leave a comment:
-
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?
Leave a comment:
-
i think if you change it to its code forgot what its called starts with a B lol youOriginally posted by Vancete View PostIs there any way to transfer files with this socket plugin?
Thanks for all!
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.
Leave a comment:
-
Is there any way to transfer files with this socket plugin?
Thanks for all!
Leave a comment:
-
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?
Leave a comment:
-
Hey, upeters.
I've been playing around with this plugin non-stop and I love it!
I managed to connect to the IRC protocol after a lot of reading the RFC 1459.
Here's an example, It connects to a server and channel and you can input raw commands like "PRIVMSG ShadowUK Hello!".
Enjoy. (if it works.)
http://shadiku.com/IRC.zip (1mb limit :O)
Leave a comment:
-
Hello Cheng,Originally posted by coffeeworm View Post
When I testing POP3Client example.
It seens Show inaccuracy.
like the attachment I post.
this is normal, and shouldn't be understood as an error in the example code. See, the email protocol was originally developed to work with ASCII only, and only ASCII characters were used in the first email messages. Only later support for other character sets was added, like big-5 Chinese as in your case, ISO-8859-1 to allow accents and diacritics for Spanish and Portuguese languages, KOI8-R for Cyrillic messages, and so on. However, the email still is stored in plain ASCII on the mail server, and a real email client would need to perform correct character encoding / decoding to display the text in all fields (sender, recipient, subject, message body) properly. However, this example just shows the source code of the message in your mailbox, without the decoding part - you could certainly add this, if you need.
Ulrich
Leave a comment:
-
-
Thanks. This is by far my favourite plugin after playing around with it. It's defiently what I'm looking for to continue an old project.Originally posted by upeters View PostHello,
yes, this should be possible. As these are parameters that (I thought) normally would not change in runtime, currently they can be set only through the Socket properties dialog. I'll update the plugin to include these functions.
Ulrich
Leave a comment:
-
Hello,Originally posted by ShadowUK View PostAs long as I didn't miss anything and it's already there could we could get a Socket.SetPort for server sockets and Socket.SetMaxClients?
yes, this should be possible. As these are parameters that (I thought) normally would not change in runtime, currently they can be set only through the Socket properties dialog. I'll update the plugin to include these functions.
Ulrich
Leave a comment:
-
Double post, sorry.
As long as I didn't miss anything and it's already there could we could get a Socket.SetPort for server sockets and Socket.SetMaxClients?
Leave a comment:
-
Hey, read my PM please. :3
Also, Do you think you could make an IRC example?
Leave a comment:
Leave a comment: