012
05.12.2002, 23:05 Uhr
void*
Generic Pointer (Operator)
|
C++: |
// Client int error=0, remoteSocket; struct sockaddr_l2 remoteSockAddrBt;
printf("Client running!\n");
remoteSocket=socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
if(-1!=remoteSocket) { memset(&remoteSockAddrBt, 0, sizeof(remoteSockAddrBt)); remoteSockAddrBt.l2_family=AF_BLUETOOTH; bacpy(&(remoteSockAddrBt.l2_bdaddr), strtoba(bluetoothAddress)); remoteSockAddrBt.l2_psm=htobs(10);
printf("Remote Bluetooth address is: %s\n", batostr(&(remoteSockAddrBt.l2_bdaddr)));
printf("Trying to connect...");
if(-1!=connect(remoteSocket, (struct sockaddr *)&remoteSockAddrBt, sizeof(remoteSockAddrBt))) { // hier ist errno EHOSTDOWN
|
Ist da irgendwo ein logischer Fehler? -- Gruß void* |