AceLoc Posted October 1, 2006 Share Posted October 1, 2006 (edited) HotKeySet("^{F2}", "_Quit") TCPStartUp () $g_IP = InputBox("Internet Protocol (IP):", "IP:", "", "", 100, 10) $g_Port = InputBox("TCP Port:", "Port:", "", "", 100, 10) Dim $szIPADDRESS = $g_IP Dim $nPORT = $g_Port Dim $ConnectedSocket = -1 Dim $szData = GeneratePacket(8) $ConnectedSocket = TCPConnect ($szIPADDRESS, $nPORT) While 1 TCPSend ($ConnectedSocket, $szData) If Not @error Then ;MsgBox(0, "Succeed:", "Packet Sended") Else MsgBox(0, "Error:", "Unable To Sent Packet") ExitLoop EndIf WEnd Func GeneratePacket($bits) Local $packet For $x = 0 To $bits $packet &= Random(0, 1, 1) Next Return $packet EndFunc ;==>GeneratePacket Func _Quit() Exit EndFunc ;==>_QuitIs it possible to increase the size of those packets? Thnk Edited October 1, 2006 by AceLoc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
darkshadow791 Posted October 1, 2006 Share Posted October 1, 2006 Dim $szData = GeneratePacket(9999) ? Note Taker Lite - a note taking / converting tool. Link to comment Share on other sites More sharing options...
AceLoc Posted October 1, 2006 Author Share Posted October 1, 2006 Dim $szData = GeneratePacket(9999) ?then it will be 9999bits right..? [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
darkshadow791 Posted October 1, 2006 Share Posted October 1, 2006 As far as I can tell it should be. Note Taker Lite - a note taking / converting tool. Link to comment Share on other sites More sharing options...
AceLoc Posted October 1, 2006 Author Share Posted October 1, 2006 As far as I can tell it should be.okay.. Thanks [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
AceLoc Posted October 1, 2006 Author Share Posted October 1, 2006 HotKeySet("^{F2}", "_Quit") TCPStartUp () $g_IP = InputBox("Internet Protocol (IP):", "IP:", "", "", 100, 10) $g_Port = InputBox("TCP Port:", "Port:", "", "", 100, 10) $g_Size = InputBox("Size (in Bits):", "Size:", "", "", 100, 10) Dim $szIPADDRESS = $g_IP Dim $nPORT = $g_Port Dim $ConnectedSocket = -1 Dim $szData = GeneratePacket($g_Size) $ConnectedSocket = TCPConnect ($szIPADDRESS, $nPORT) While 1 TCPSend ($ConnectedSocket, $szData) If Not @error Then ;MsgBox(0, "Succeed:", "Packet Sended") Else MsgBox(0, "Error:", "Unable To Sent Packet") ExitLoop EndIf WEnd Func GeneratePacket($bits) Local $packet For $x = 0 To $bits $packet &= Random(0, 1, 1) Next Return $packet EndFunc ;==>GeneratePacket Func _Quit() Exit EndFunc ;==>_Quit so this will work fine? [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
BigDod Posted October 1, 2006 Share Posted October 1, 2006 so this will work fine? Try it and you can answer your own question Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
AceLoc Posted October 1, 2006 Author Share Posted October 1, 2006 Try it and you can answer your own question Yep .. it does Thanks for helping everybody & Topic can be closed. [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
erifash Posted October 1, 2006 Share Posted October 1, 2006 You do realize you're sending bytes not bits, right?Those 1's and 0's are just characters, not actual binary. My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
AceLoc Posted October 1, 2006 Author Share Posted October 1, 2006 You do realize you're sending bytes not bits, right?Those 1's and 0's are just characters, not actual binary. ofcourse i do.. i said this topic could be closed.so please stop posting --Thank [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now