yucatan Posted November 5, 2008 Share Posted November 5, 2008 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 More sharing options...
dbzfanatic Posted November 5, 2008 Share Posted November 5, 2008 This has been asked before, and optimized. Search the forums for server and/or client and TCPSend()/TCPRecieve(). Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
yucatan Posted November 5, 2008 Author Share Posted November 5, 2008 This has been asked before, and optimized. Search the forums for server and/or client and TCPSend()/TCPRecieve().i already did but i cant figure it out.. and rasim told me to dont hijack a topic thats why i started one my own Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 5, 2008 Share Posted November 5, 2008 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. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
yucatan Posted November 5, 2008 Author Share Posted November 5, 2008 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 More sharing options...
yucatan Posted November 6, 2008 Author Share Posted November 6, 2008 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 More sharing options...
yucatan Posted December 18, 2008 Author Share Posted December 18, 2008 how i can send a file over tcp that is constandly getting bigger how i can send that ? and that when i recieve i am constandly getting a bigger file.. Link to comment Share on other sites More sharing options...
yucatan Posted December 18, 2008 Author Share Posted December 18, 2008 *bump* PLEAS help me on this i'm trying to search for a sellution for 2 weeks now i'have tryed alot but i cant get it working teh way i need it pleas assit me Link to comment Share on other sites More sharing options...
yucatan Posted December 18, 2008 Author Share Posted December 18, 2008 *rebump* Again plz help me Link to comment Share on other sites More sharing options...
Developers Jos Posted December 18, 2008 Developers Share Posted December 18, 2008 thats enough bumps for one day SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts