Jump to content

File Transfer


Recommended Posts

Hi frends,

I am currently developing window based Chat application(using TCP). I am half way trough. I got strucked, when i try to insert smiley option and try to enable file transfer option. My question is as follows

1.Is there any way to insert Smiley option.That is send and recieve smiley.

2.How to transfer file between two parties(involved in chat), I am using GUICtrlCtreateEdit control for chatting.

3.How can i change a layout that titlebar color, scroll bar color.

Please reply me by quoting examples or syntax.

Thanks in advance

[size="4"][font="Arial Narrow"][font="Garamond"]Attitude is a little thing that makes a big difference[/font][/font][/size][indent][/indent]

Link to comment
Share on other sites

@Mecrazycoder

Of course its possible, an extract of my FT_Pocket here :

Sender :

TCPStartUp( )
$f_Socket = TCPConnect($s_IP, $s_port) ;open TCP connexion
;declare $s_file as your smiley file
$f_fopen = FileOpen($s_file, 16) ;open file in binary mode
$s_Data = FileRead($f_fopen) ;read binary string to send
TCPSend($f_Socket, $s_Data) ;send binary string
TCPCloseSocket($f_Socket)
FileClose($f_fopen)
TCPShutdown( )

Receiver :

$f_Listen = TCPListen($s_lip, $s_port)
$f_Socket = TCPAccept($f_Listen)

;declare $s_output as the smiley that you will receive
$f_fopen = FileOpen($s_output, 18) ;open the file in binary for write
;declare $f_size as the size of the smiley that you will receive (in bytes)
$s_Data = TCPRecv($f_Socket, $f_size)
TCPCloseSocket($f_Socket)
FileClose($f_fopen)
TCPShutdown( )

Cheers, FireFox.

Edited by FireFox
Link to comment
Share on other sites

@Quickest obfuscated spammer,

Tanx man. But i am expecting something different.Please go through my code. In GUICtrlCreateEdit for displaying chat,in that window i want to drag a file and drop over it.this can be perform on both ends.

ChatWindowClient_v1.4.au3

ChatWindowServer_v1.4.au3

[size="4"][font="Arial Narrow"][font="Garamond"]Attitude is a little thing that makes a big difference[/font][/font][/size][indent][/indent]

Link to comment
Share on other sites

@Mecrazycoder

Of course its possible, an extract of my FT_Pocket here :

Sender :

TCPStartUp( )
$f_Socket = TCPConnect($s_IP, $s_port) ;open TCP connexion
;declare $s_file as your smiley file
$f_fopen = FileOpen($s_file, 16) ;open file in binary mode
$s_Data = FileRead($f_fopen) ;read binary string to send
TCPSend($f_Socket, $s_Data) ;send binary string
TCPCloseSocket($f_Socket)
FileClose($f_fopen)
TCPShutdown( )

Receiver :

$f_Listen = TCPListen($s_lip, $s_port)
$f_Socket = TCPAccept($f_Listen)

;declare $s_output as the smiley that you will receive
$f_fopen = FileOpen($s_output, 18) ;open the file in binary for write
;declare $f_size as the size of the smiley that you will receive (in bytes)
$s_Data = TCPRecv($f_Socket, $f_size)
TCPCloseSocket($f_Socket)
FileClose($f_fopen)
TCPShutdown( )

Cheers, FireFox.

Please do help me...

[size="4"][font="Arial Narrow"][font="Garamond"]Attitude is a little thing that makes a big difference[/font][/font][/size][indent][/indent]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...