vmdsock.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if defined(VMDSOCKINTERNAL)
00022
00023 #if !defined(_MSC_VER)
00024 #include <unistd.h>
00025 #include <sys/types.h>
00026 #include <sys/socket.h>
00027 #include <sys/time.h>
00028 #include <netinet/in.h>
00029 #include <sys/file.h>
00030 #endif
00031
00032 typedef struct {
00033 struct sockaddr_in addr;
00034 int addrlen;
00035 int sd;
00036 } vmdsocket;
00037
00038 #endif
00039
00040 #ifdef WIN32
00041 #if defined(SimTK_MOLMODEL_BUILDING_SHARED_LIBRARY)
00042 #define SimTK_MOLMODEL_EXPORT __declspec(dllexport)
00043 #elif defined(SimTK_MOLMODEL_BUILDING_STATIC_LIBRARY) || defined(SimTK_USE_STATIC_LIBRARIES)
00044 #define SimTK_MOLMODEL_EXPORT
00045 #else
00046 #define SimTK_MOLMODEL_EXPORT __declspec(dllimport) // i.e., a client of a shared library
00047 #endif
00048 #else
00049 #define SimTK_MOLMODEL_EXPORT // Linux, Mac
00050 #endif
00051
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055
00056 int SimTK_MOLMODEL_EXPORT vmdsock_init(void);
00057 void SimTK_MOLMODEL_EXPORT *vmdsock_create(void);
00058 int SimTK_MOLMODEL_EXPORT vmdsock_bind(void *, int);
00059 int SimTK_MOLMODEL_EXPORT vmdsock_listen(void *);
00060 void SimTK_MOLMODEL_EXPORT *vmdsock_accept(void *);
00061 int SimTK_MOLMODEL_EXPORT vmdsock_connect(void *, const char *, int);
00062 int SimTK_MOLMODEL_EXPORT vmdsock_write(void *, const void *, int);
00063 int SimTK_MOLMODEL_EXPORT vmdsock_read(void *, void *, int);
00064 int SimTK_MOLMODEL_EXPORT vmdsock_selread(void *, int);
00065 int SimTK_MOLMODEL_EXPORT vmdsock_selwrite(void *, int);
00066 void SimTK_MOLMODEL_EXPORT vmdsock_shutdown(void *);
00067 void SimTK_MOLMODEL_EXPORT vmdsock_destroy(void *);
00068
00069 #ifdef __cplusplus
00070 }
00071 #endif
00072