You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the AS3/Flash Player support for sockets doesn't map easily to posix sockets, it wasn't implemented in crossbridge. You can use AS3 sockets and pass data back and forth via inline_as3(). In other words, you can use sockets in your C++ app, but you'd need to write your own implementation.
client.c is a test code. This file contains socket API for example socket, connect, send, why only 'connect' result in link error?
source code client.c :
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#include <unistd.h>
int test(int argc, char **argv)
{
int client_socket, port;
struct sockaddr_in serv_addr;
if(argc != 3)
{
printf("useage:socket_client ipaddress port");
return -1;
}
}
source code main.c :
#include "AS3/AS3.h"
int main()
{
AS3_GoAsync();
}
when compile,
$ make
-------- Sample 5 --------
Now compile a SWC and demo SWF
"/cygdrive/c/Crossbridge/sdk/usr/bin/g++" -Werror -Wno-write-strings -Wno-trigraphs -O4 main.cpp client.c -emit-swc=sample.test -o test.swc
/tmp/cclj1lfj.o: error: undefined reference to '_connect'
collect2: ld returned 1 exit status
Makefile:2: recipe for target `T05' failed
make: *** [T05] Error 1
If crossbridge sdk have some problem?
The text was updated successfully, but these errors were encountered: