AutoHotkey Community

It is currently May 27th, 2012, 3:22 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 140 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 10  Next
Author Message
 Post subject:
PostPosted: May 24th, 2010, 4:39 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
horntail wrote:
Ive noticed during testing that the recv() function in the example clients is receiving an sEvent of "SEND" when the clients ive looked at do not appear to handle this value, i think its something to do with the code from AHKsock below:

Not sure what you mean. After calling recv(), AHKsock calls the appropriate user function with sEvent RECEIVED, not SEND.
Also, clients receive the event SEND as well, but they simply do not handle it. (Because in the examples I've provided, clients don't really have anything to send to servers).

horntail wrote:
the examples worked a few days ago but now they just dont

That's strange, I didn't change anything. Can you describe to me what happens? Which examples? Can you also post the DebugView log?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 24th, 2010, 6:56 pm 
Offline

Joined: August 3rd, 2009, 4:44 pm
Posts: 69
Location: UK
i start up the file transfer server for multiple clients then the client. then i click listen on the server followed by connect on the client. after that i just appears to do nothing, the server says currently serving : 0 while the debug says

Code:
[5172] Client - AHKsock_Connect() successfully connected!


i dont understand your code enough yet to be able to work it out myself

edit: i forgot to mention that its on windows 7 64bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 24th, 2010, 10:48 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
I'm actually in the process of upgrading my machine to Windows 7 x64. Give me some time and I'll be able to test it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2010, 6:23 am 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
horntail wrote:
i start up the file transfer server for multiple clients then the client. then i click listen on the server followed by connect on the client. after that i just appears to do nothing, the server says currently serving : 0 while the debug says

Code:
[5172] Client - AHKsock_Connect() successfully connected!


i dont understand your code enough yet to be able to work it out myself

edit: i forgot to mention that its on windows 7 64bit

OK I just tested it on my machine (Windows 7 64-bit as well), and it works flawlessly. I'm not sure what could be wrong. Try redownloading the files (and upgrade to the latest version of AHK if you don't already have it).

The OutputDebug line you posted is the only line outputted?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2010, 7:53 pm 
Offline

Joined: August 3rd, 2009, 4:44 pm
Posts: 69
Location: UK
i change the port number that they were using and its all working now. for some reason on my laptop it would work if you connected to port 27015 through the lan but not through localhost... i dont understand why but oh well it works now. thanks for the help


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 29th, 2010, 7:18 pm 
Is something like this possible? ...

Image


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 29th, 2010, 8:41 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
Blue60 wrote:
Is something like this possible? ...

If you mean IPv6 support, then no. It hasn't yet been implemented in AHKsock.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 30th, 2010, 2:26 am 
Thank you, ... this looks like a good program!!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 30th, 2010, 6:32 pm 
Offline
User avatar

Joined: October 31st, 2008, 9:39 am
Posts: 641
Location: France
Becarefull with IpV6, 0:0:0:0:0:0:0:0 ( so it's all 0 , same thing for ipv4) is also your local adress with winsock2 and discard problem about 127.0.0.1 or ::1 ... tested with ipv4 and 6 with fixed address and a router.

I did this but I need more feedback to do good things with, howerver If you want to know more about IpV6 and try to find your solve : http://www.autohotkey.com/forum/viewtopic.php?t=57306


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2010, 4:20 am 
Zaelia,

Thank you! :)

I have a question. How do I discover the IPV6 configured on my machine?

Typical

Code:

Msgbox, %A_IpAddress1%



seems to be only logical IPv4 based. For example, if I uncheck IPV4.

Image

A Msgbox, %A_IpAddress1% reveals 127.0.0.1, and not the complex IPV6 configured (not using local-loop V6). I would rather see the full 2001:0DB8:AC10:FE01. Regardless of what V6 is configured on the machine, A_IPADDRESS1 only stores 127.0.0.1.

Might you happen to know how I could see locally configured IP, if it is v6 only configured? :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2010, 6:42 am 
Offline
User avatar

Joined: October 31st, 2008, 9:39 am
Posts: 641
Location: France
Don't click "Properties" but "Details..." button

Control Panel, Network and Sharing Center, View Status, Details...

Ipv6 is very strange, depends of your Internet service provider...
IPv4 and v6 can be avaible in same time...
Simple Ipv6compatibleToIpv4 or 4to6 don't work all time, they are strange "mask" sometimes...
Your Ipv6 is not "fix" by default...
Your Ipv6 in localnetwork can be the same for internet...

However it's work well, just need to discover how your computer and your router work (and your Internet service provider perhaps) :o

For my case, I use the "Ipv6 IP Address", not temporary, not link local, not default gateway, and/or my router redirect (in pseudo ipv4 with an open port) to my computer, need more feedback too and more explor also :)

I don't look in source but it possible than Msgbox, %A_IpAddress1% always show your local IP in ipv4... so use a winsock function for retrive ipv6 ( dunno , just and idea ) and don't disable ipv4 for compatibility with ahk...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2010, 8:49 am 
Zaelia, thank you so much :) The IP contexts are strange, because I find them very long addresses, and nobody uses them. I was thinking there would be a way to ping the IPv6 address. Is the WinSock? way, something you can enlighten me on? :D ..


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2010, 9:18 am 
Offline
User avatar

Joined: October 31st, 2008, 9:39 am
Posts: 641
Location: France
Hum, ping use ICMP protocol, not TCP or UDP, searsh in forum about Ping, or use your Cmd or perhaps TelNet or other stuff for ping/pong to an address... I don't know more about this...

...and Yes IPV6 is a long address XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2010, 9:24 am 
Very excellent,-- I will do some research into this special topic. Cheers :), Jay


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2010, 9:52 am 
Offline
User avatar

Joined: October 31st, 2008, 9:39 am
Posts: 641
Location: France
From Source "script_autoit.cpp" (so it's old, it's not ironic)
Code:
VarSizeType BIV_IPAddress(char *aBuf, char *aVarName)
{
   // aaa.bbb.ccc.ddd = 15, but allow room for larger IP's in the future.
   #define IP_ADDRESS_SIZE 32 // The maximum size of any of the strings we return, including terminator.
   if (!aBuf)
      return IP_ADDRESS_SIZE - 1;  // -1 since we're returning the length of the var's contents, not the size.

   WSADATA wsadata;
   if (WSAStartup(MAKEWORD(1, 1), &wsadata)) // Failed (it returns 0 on success).
   {
      *aBuf = '\0';
      return 0;
   }

   char host_name[256];
   gethostname(host_name, sizeof(host_name));
   HOSTENT *lpHost = gethostbyname(host_name);

   // au3: How many adapters have we?
   int adapter_count = 0;
   while (lpHost->h_addr_list[adapter_count])
      ++adapter_count;

   int adapter_index = aVarName[11] - '1'; // A_IPAddress[1-4]
   if (adapter_index >= adapter_count)
      strcpy(aBuf, "0.0.0.0");
   else
   {
      IN_ADDR inaddr;
      memcpy(&inaddr, lpHost->h_addr_list[adapter_index], 4);
      strlcpy(aBuf, (char *)inet_ntoa(inaddr), IP_ADDRESS_SIZE);
   }

   WSACleanup();
   return (VarSizeType)strlen(aBuf);
}

Gethostbyname() is only for Ipv4 if I'm not in wrong way, GetAddrInfo is for v6,v4, and URL... Then %IPAddress1% is only an IPv4 Address

Edit: I posted a "solve" here
http://www.autohotkey.com/forum/viewtopic.php?t=58695


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 140 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 10  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher, Stigg, tidbit and 12 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group