Jump to content

filesend and filerecieve


yucatan
 Share

Recommended Posts

hi i am making a server and a client

and the server needs to send a file to the client but i only have one problem

the file that i'm sending is constandly gettings bigger.. is there any way to stay sending the entire size of the file has been sent

and the client needs to do this recieve and write the file down on the hard drive and when he stays recieving so the file is gettings bigger then add it and dont rewrite the file but stay recieving and adding the data until the transver is compleet i'm talking abouth larger files but constanly the files on the server are gettings bigger and the server olso needs to stay sending until the file dont get bigger anymore can somebody help me on this ?

Link to comment
Share on other sites

Link to comment
Share on other sites

It's true that hijacking topics is a very bad practice but you should be able to use the principles and ideas behind those servers to suit your needs, if you can not learn from the code already posted in other topics perhaps it is best if you don't use this method as it seems to be beyond your current skill level.

Link to comment
Share on other sites

ok i have my script now working. the file send and recieve works now i have some questions.

i want to sent a file, but the problem is that the file is gettings bigger for a while maby when the file get sendet the file gets bigger

the upcoming 30 min.

eatch seconds the file get some bits larger

i want that that the connections stays open and the sendig does not stop until the server say so

so when the file is not gettings bigger hold the tcp connection open and hold the tcp recieve open until the file on the server side dont get bigger anymore then send a command that the client know that the transmission is done

can somebody help me on that?

this is my code

server

#include<_FileSend.au3>
$g_IP = "127.0.0.1"
TCPStartUp()
$MainSocket = TCPListen($g_IP, 65432,  100 )
If $MainSocket = -1 Then MsgBox(4096, "Test", @error)
While 1
$ConnectedSocket = TCPAccept( $MainSocket)
If $ConnectedSocket >= 0 Then
_FileSend(@DesktopDir&"\naamloos.JPG", $ConnectedSocket)
EndIf
Wend

client

#include<_FileRecieve.au3>
$g_IP = "127.0.0.1"
TCPStartUp()
$socket = TCPConnect( $g_IP, 65432 )
If $socket = -1 Then Exit
ConsoleWrite($socket)
_FileRecieve(@MyDocumentsDir&"\tcp.jpg", $socket)
If @error Then MsgBox(48,"","Error: "&@error)
Link to comment
Share on other sites

ok i have my script now working. the file send and recieve works now i have some questions.

i want to sent a file, but the problem is that the file is gettings bigger for a while maby when the file get sendet the file gets bigger

the upcoming 30 min.

eatch seconds the file get some bits larger

i want that that the connections stays open and the sendig does not stop until the server say so

so when the file is not gettings bigger hold the tcp connection open and hold the tcp recieve open until the file on the server side dont get bigger anymore then send a command that the client know that the transmission is done

can somebody help me on that?

this is my code

server

#include<_FileSend.au3>
$g_IP = "127.0.0.1"
TCPStartUp()
$MainSocket = TCPListen($g_IP, 65432,  100 )
If $MainSocket = -1 Then MsgBox(4096, "Test", @error)
While 1
$ConnectedSocket = TCPAccept( $MainSocket)
If $ConnectedSocket >= 0 Then
_FileSend(@DesktopDir&"\naamloos.JPG", $ConnectedSocket)
EndIf
Wend

client

#include<_FileRecieve.au3>
$g_IP = "127.0.0.1"
TCPStartUp()
$socket = TCPConnect( $g_IP, 65432 )
If $socket = -1 Then Exit
ConsoleWrite($socket)
_FileRecieve(@MyDocumentsDir&"\tcp.jpg", $socket)
If @error Then MsgBox(48,"","Error: "&@error)

pleas somebody.... help me out pleas...

Link to comment
Share on other sites

  • 1 month later...
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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