   Finding games, must be wrong - Virtual PC
  Hey there,my network engine has the capability to look for other servers. It worked - I thought. But when I create a server and trying to find it with a client under Virtual PC - it doesnt find it. But other games can find each other.I'll write how it works:when a client wants to find a host, sends an UPD packetUPDSocket:= socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);SNDBUF:=0;TCPNODELAY:=1;BROADCAST:=1;setsockopt(UPDsocket,SOL_SOCKET,SO_SNDBUF,PChar(@SNDBUF),sizeof(SNDBUF));setsockopt(UPDsocket,SOL_SOCKET,TCP_NODELAY,PChar(@TCPNODELAY),sizeof(TCPNODELAY))setsockopt(UPDsocket,SOL_SOCKET,SO_BROADCAST,PChar(@BROADCAST),sizeof(BROADCAST))hostaddr.sin_family:=AF_INET;hostaddr.sin_port  :=htons(45555);hostaddr.sin_addr.s_addr:=inet_addr(PChar('255.255.255.255'));.... adding more plus identification string to "buffer" ....//ask all maschines sendto (UPDsocket,buffer.Memory^,buffer.Size, 0,@hostaddr,sizeof(hostaddr));and then it starts a thread to watch the incoming packets: sniffer:= socket(AF_INET, SOCK_RAW, IPPROTO_UDP); FillChar (Dest, SizeOf(Dest), 0); dest.sin_addr.S_un_b.s_b1:= my; dest.sin_addr.S_un_b.s_b2:= ip dest.sin_addr.S_un_b.s_b3:= add dest.sin_addr.S_un_b.s_b4:= res; dest.sin_family:= AF_INET; dest.sin_port  := 0; bind(sniffer, @dest,sizeof(dest)) j:= 1; WSAIoctl(sniffer, IOC_IN or IOC_VENDOR or 1, @j,4, nil, 0, LPDWORD(@_in),nil, nil)the thread itself: while not Terminated do begin  mangobyte:= recvfrom (sniffer,p^,SNIFFERPUFFERSIZE,0,From,FromLen); //Eat as much as u can  if (mangobyte > 0) then begin  M.Write (p^, mangobyte);  M.Position:= 28; // now comes the packed data end;  end;but it doesnt seems to get any data.The server also creates a thread like that and watching the incoming UDP packets, so it can answer for this enumerating request.But when the server and client connect directly, by IP - they works perfectly.   
  You're not checking errors. TCP_NODELAY is an illegal option for a UDP socket. While probably not your current problem, it's a bad habit to not check errors.It may be that Virtual PC does not support the proper broadcast mode for the network interface. Or it may be that Virtual PC sets up a networking mode that doesn't forward broadcasts (such as virtual NAT). Given that it works for "real" machines, I would look at VirtualPC configuration problems.;  Or try it on a decent VM like VMWare or VirtualBox (my personal favorite)   ;Quote:Original post by AAAOr try it on a decent VM like VMWare or VirtualBox (my personal favorite)Yeah I haven't used VirtualPC since discovering VirtualBox!VirtualBox seems to have less problems across the wide variety of Os's I use it with including Windows LOL.Latest versions even have preliminary Opengl 3D support.;  Just throwing this out here.... But, you do have network connectivity between your local PC and Virtual PC (and on the same subnet) I take it?   