gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
GmshSocket.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // Permission is hereby granted, free of charge, to any person
4 // obtaining a copy of this software and associated documentation
5 // files (the "Software"), to deal in the Software without
6 // restriction, including without limitation the rights to use, copy,
7 // modify, merge, publish, distribute, and/or sell copies of the
8 // Software, and to permit persons to whom the Software is furnished
9 // to do so, provided that the above copyright notice(s) and this
10 // permission notice appear in all copies of the Software and that
11 // both the above copyright notice(s) and this permission notice
12 // appear in supporting documentation.
13 //
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
18 // COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
19 // ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
20 // DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
21 // WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
22 // ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
23 // OF THIS SOFTWARE.
24 
25 #ifndef GMSH_SOCKET_H
26 #define GMSH_SOCKET_H
27 
28 #include "GmshConfig.h"
29 
30 #include <string>
31 #include <stdexcept>
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <string.h>
35 
36 #if defined(_AIX)
37 #include <strings.h>
38 #endif
39 
40 #if !defined(WIN32) || defined(__CYGWIN__)
41 #include <unistd.h>
42 #include <sys/types.h>
43 #include <sys/socket.h>
44 #include <sys/stat.h>
45 #include <sys/un.h>
46 #include <sys/time.h>
47 #include <netinet/in.h>
48 #include <netinet/tcp.h>
49 #include <netdb.h>
50 #if defined(HAVE_NO_SOCKLEN_T)
51 typedef int socklen_t;
52 #endif
53 #else
54 #include <winsock.h>
55 #include <process.h>
56 typedef int socklen_t;
57 #endif
58 
59 class GmshSocket {
60 public:
61  // types of messages that can be exchanged (never use values greater
62  // that 65535: if we receive a type > 65535 we assume that we
63  // receive data from a machine with a different byte ordering, and
64  // we swap the bytes in the payload)
65  enum MessageType {
67  GMSH_STOP = 2,
68  GMSH_INFO = 10,
70  GMSH_ERROR = 12,
93  GMSH_OPTION_5 = 104
94  };
95 
96 protected:
97  // the socket descriptor
98  int _sock;
99  // the socket name
100  std::string _sockname;
101  // statistics
102  unsigned long int _sent, _received;
103  // send some data over the socket
104  int _sendData(const void *buffer, int bytes)
105  {
106  const char *buf = (const char *)buffer;
107  long int sofar = 0;
108  long int remaining = bytes;
109  do {
110  long int len = send(_sock, buf + sofar, remaining, 0);
111  if(len < 0) return -1; // error
112  sofar += len;
113  remaining -= len;
114  } while(remaining > 0);
115  _sent += bytes;
116  return bytes;
117  }
118  // receive some data over the socket
119  int _receiveData(void *buffer, int bytes)
120  {
121  char *buf = (char *)buffer;
122  long int sofar = 0;
123  long int remaining = bytes;
124  do {
125  long int len = recv(_sock, buf + sofar, remaining, 0);
126  if(len == 0) break; // we're done!
127  if(len < 0) return -1; // error
128  sofar += len;
129  remaining -= len;
130  } while(remaining > 0);
131  _received += bytes;
132  return bytes;
133  }
134  // utility function to swap bytes in an array
135  void _swapBytes(char *array, int size, int n)
136  {
137  char *x = new char[size];
138  for(int i = 0; i < n; i++) {
139  char *a = &array[i * size];
140  memcpy(x, a, size);
141  for(int c = 0; c < size; c++) a[size - 1 - c] = x[c];
142  }
143  delete[] x;
144  }
145  // sleep for some milliseconds
146  void _sleep(int ms)
147  {
148 #if !defined(WIN32) || defined(__CYGWIN__)
149  usleep(1000 * ms);
150 #else
151  Sleep(ms);
152 #endif
153  }
154 
155 public:
157  {
158 #if defined(WIN32) && !defined(__CYGWIN__)
159  WSADATA wsaData;
160  WSAStartup(MAKEWORD(2, 2), &wsaData);
161 #endif
162  }
164  {
165 #if defined(WIN32) && !defined(__CYGWIN__)
166  WSACleanup();
167 #endif
168  }
169  // Wait for some data to read on the socket (if seconds and microseconds == 0
170  // we check for available data and return immediately, i.e., we do
171  // polling). Returns 1 when data is available, 0 when nothing happened before
172  // the time delay, -1 on error.
173  int Select(int seconds, int microseconds, int socket = -1)
174  {
175  int s = (socket < 0) ? _sock : socket;
176  struct timeval tv;
177  tv.tv_sec = seconds;
178  tv.tv_usec = microseconds;
179  fd_set rfds;
180  FD_ZERO(&rfds);
181  FD_SET(s, &rfds);
182  // select checks all IO descriptors between 0 and its first arg, minus 1;
183  // hence the +1 below
184  return select(s + 1, &rfds, nullptr, nullptr, &tv);
185  }
186  void SendMessage(int type, int length, const void *msg)
187  {
188  // send header (type + length)
189  _sendData(&type, sizeof(int));
190  _sendData(&length, sizeof(int));
191  // send body
192  _sendData(msg, length);
193  }
194  void SendString(int type, const char *str)
195  {
196  SendMessage(type, (int)strlen(str), str);
197  }
198  void Info(const char *str) { SendString(GMSH_INFO, str); }
199  void Warning(const char *str) { SendString(GMSH_WARNING, str); }
200  void Error(const char *str) { SendString(GMSH_ERROR, str); }
201  void Progress(const char *str) { SendString(GMSH_PROGRESS, str); }
202  void MergeFile(const char *str) { SendString(GMSH_MERGE_FILE, str); }
203  void OpenProject(const char *str) { SendString(GMSH_OPEN_PROJECT, str); }
204  void ParseString(const char *str) { SendString(GMSH_PARSE_STRING, str); }
205  void SpeedTest(const char *str) { SendString(GMSH_SPEED_TEST, str); }
206  void Option(int num, const char *str)
207  {
208  if(num < 1) num = 1;
209  if(num > 5) num = 5;
210  SendString(GMSH_OPTION_1 + num - 1, str);
211  }
212  int ReceiveHeader(int *type, int *len, int *swap)
213  {
214  *swap = 0;
215  if(_receiveData(type, sizeof(int)) > 0) {
216  if(*type > 65535) {
217  // the data comes from a machine with different endianness and
218  // we must swap the bytes
219  *swap = 1;
220  _swapBytes((char *)type, sizeof(int), 1);
221  }
222  if(_receiveData(len, sizeof(int)) > 0) {
223  if(*swap) _swapBytes((char *)len, sizeof(int), 1);
224  return 1;
225  }
226  }
227  return 0;
228  }
229  int ReceiveMessage(int len, void *buffer)
230  {
231  if(_receiveData(buffer, len) == len) return 1;
232  return 0;
233  }
234  // str should be allocated with size (len+1)
235  int ReceiveString(int len, char *str)
236  {
237  if(_receiveData(str, len) == len) {
238  str[len] = '\0';
239  return 1;
240  }
241  return 0;
242  }
243  void CloseSocket(int s)
244  {
245 #if !defined(WIN32) || defined(__CYGWIN__)
246  close(s);
247 #else
248  closesocket(s);
249 #endif
250  }
251  void ShutdownSocket(int s)
252  {
253 #if !defined(WIN32) || defined(__CYGWIN__)
254  shutdown(s, SHUT_RDWR);
255 #endif
256  }
257  unsigned long int SentBytes() { return _sent; }
258  unsigned long int ReceivedBytes() { return _received; }
259 };
260 
261 class GmshClient : public GmshSocket {
262 public:
265  int Connect(const char *sockname)
266  {
267  if(strstr(sockname, "/") || strstr(sockname, "\\") ||
268  !strstr(sockname, ":")) {
269 #if !defined(WIN32) || defined(__CYGWIN__)
270  // UNIX socket (testing ":" is not enough with Windows paths)
271  _sock = socket(PF_UNIX, SOCK_STREAM, 0);
272  if(_sock < 0) return -1;
273  // try to connect socket to given name
274  struct sockaddr_un addr_un;
275  memset((char *)&addr_un, 0, sizeof(addr_un));
276  addr_un.sun_family = AF_UNIX;
277  strcpy(addr_un.sun_path, sockname);
278  for(int tries = 0; tries < 5; tries++) {
279  if(connect(_sock, (struct sockaddr *)&addr_un, sizeof(addr_un)) >= 0)
280  return _sock;
281  _sleep(100);
282  }
283 #else
284  return -1; // Unix sockets are not available on Windows
285 #endif
286  }
287  else {
288  // TCP/IP socket
289  _sock = socket(AF_INET, SOCK_STREAM, 0);
290  if(_sock < 0) return -1;
291  char one = 1;
292  // disable Nagle's algorithm (very slow for many small messages)
293  setsockopt(_sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
294  // try to connect socket to host:port
295  const char *port = strstr(sockname, ":");
296  int portno = atoi(port + 1);
297  char *remote = strdup(sockname);
298  int remotelen = (int)(strlen(remote) - strlen(port));
299  if(remotelen > 0) strncpy(remote, sockname, remotelen);
300  if(remotelen >= 0) remote[remotelen] = '\0';
301  struct hostent *server;
302  if(!(server = gethostbyname(remote))) {
304  free(remote);
305  return -3; // no such host
306  }
307  free(remote);
308  struct sockaddr_in addr_in;
309  memset((char *)&addr_in, 0, sizeof(addr_in));
310  addr_in.sin_family = AF_INET;
311  memcpy((char *)&addr_in.sin_addr.s_addr, (char *)server->h_addr,
312  server->h_length);
313  addr_in.sin_port = htons(portno);
314  for(int tries = 0; tries < 5; tries++) {
315  if(connect(_sock, (struct sockaddr *)&addr_in, sizeof(addr_in)) >= 0) {
316  return _sock;
317  }
318  _sleep(100);
319  }
320  }
322  return -2; // couldn't connect
323  }
324  void Start()
325  {
326  char tmp[256];
327 #if !defined(WIN32) || defined(__CYGWIN__)
328  sprintf(tmp, "%d", getpid());
329 #else
330  sprintf(tmp, "%d", _getpid());
331 #endif
332  SendString(GMSH_START, tmp);
333  }
334  void Stop() { SendString(GMSH_STOP, "Goodbye!"); }
336 };
337 
338 class GmshServer : public GmshSocket {
339 private:
340  int _portno;
341 
342 public:
344  virtual ~GmshServer() {}
345  virtual int NonBlockingSystemCall(const std::string &exe,
346  const std::string &args) = 0;
347  virtual int NonBlockingWait(double waitint, double timeout,
348  int socket = -1) = 0;
349  // start the client by launching "exe args" (args is supposed to contain
350  // '%s' where the socket name should appear)
351  int Start(const std::string &exe, const std::string &args,
352  const std::string &sockname, double timeout)
353  {
354  _sockname = sockname;
355  int tmpsock;
356  if(strstr(_sockname.c_str(), "/") || strstr(_sockname.c_str(), "\\") ||
357  !strstr(_sockname.c_str(), ":")) {
358  // UNIX socket (testing ":" is not enough with Windows paths)
359  _portno = -1;
360 #if !defined(WIN32) || defined(__CYGWIN__)
361  // delete the file if it already exists
362  unlink(_sockname.c_str());
363  // create a socket
364  tmpsock = socket(PF_UNIX, SOCK_STREAM, 0);
365  if(tmpsock < 0) throw std::runtime_error("Couldn't create socket");
366  // bind the socket to its name
367  struct sockaddr_un addr_un;
368  memset((char *)&addr_un, 0, sizeof(addr_un));
369  strcpy(addr_un.sun_path, _sockname.c_str());
370  addr_un.sun_family = AF_UNIX;
371  if(bind(tmpsock, (struct sockaddr *)&addr_un, sizeof(addr_un)) < 0) {
372  CloseSocket(tmpsock);
373  throw std::runtime_error("Couldn't bind socket to name");
374  }
375  // change permissions on the socket name in case it has to be rm'd later
376  chmod(_sockname.c_str(), 0666);
377 #else
378  throw std::runtime_error("Unix sockets not available on Windows");
379 #endif
380  }
381  else {
382  // TCP/IP socket: valid names are either explicit ("hostname:12345")
383  // or implicit ("hostname:", "hostname: ", "hostname:0") in which case
384  // the system attributes at random an available port
385  const char *port = strstr(_sockname.c_str(), ":");
386  _portno = atoi(port + 1);
387  // create a socket
388  tmpsock = socket(AF_INET, SOCK_STREAM, 0);
389  char one = 1;
390  setsockopt(tmpsock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
391 
392 #if !defined(WIN32) || defined(__CYGWIN__)
393  if(tmpsock < 0)
394 #else
395  if(tmpsock == (int)INVALID_SOCKET)
396 #endif
397  throw std::runtime_error("Couldn't create socket");
398  // bind the socket to its name
399  struct sockaddr_in addr_in;
400  memset((char *)&addr_in, 0, sizeof(addr_in));
401  addr_in.sin_family = AF_INET;
402  addr_in.sin_addr.s_addr = INADDR_ANY;
403  addr_in.sin_port = htons(_portno); // random assign if _portno == 0
404  if(bind(tmpsock, (struct sockaddr *)&addr_in, sizeof(addr_in)) < 0) {
405  CloseSocket(tmpsock);
406  throw std::runtime_error("Couldn't bind socket to name");
407  }
408  if(!_portno) { // retrieve name if randomly assigned port
409  socklen_t addrlen = sizeof(addr_in);
410  getsockname(tmpsock, (struct sockaddr *)&addr_in, &addrlen);
411  _portno = ntohs(addr_in.sin_port);
412  int pos = (int)_sockname.find(':'); // remove trailing ' ' or '0'
413  char tmp[256];
414  sprintf(tmp, "%s:%d", _sockname.substr(0, pos).c_str(), _portno);
415  _sockname.assign(tmp);
416  }
417  }
418 
419  if(exe.size() || args.size()) {
420  char s[1024];
421  sprintf(s, args.c_str(), _sockname.c_str());
422  NonBlockingSystemCall(exe, s); // starts the solver
423  }
424  else {
425  timeout = 0.; // no command launched: don't set a timeout
426  }
427 
428  // listen on socket (queue up to 20 connections before having
429  // them automatically rejected)
430  if(listen(tmpsock, 20)) {
431  CloseSocket(tmpsock);
432  throw std::runtime_error("Socket listen failed");
433  }
434 
435  // wait until we get data
436  int ret = NonBlockingWait(0.001, timeout, tmpsock);
437  if(ret) {
438  CloseSocket(tmpsock);
439  if(ret == 2) { throw std::runtime_error("Socket listening timeout"); }
440  else {
441  return -1; // stopped listening
442  }
443  }
444 
445  // accept connection request
446  if(_portno < 0) {
447 #if !defined(WIN32) || defined(__CYGWIN__)
448  struct sockaddr_un from_un;
449  socklen_t len = sizeof(from_un);
450  _sock = accept(tmpsock, (struct sockaddr *)&from_un, &len);
451 #endif
452  }
453  else {
454  struct sockaddr_in from_in;
455  socklen_t len = sizeof(from_in);
456  _sock = accept(tmpsock, (struct sockaddr *)&from_in, &len);
457  char one = 1;
458  setsockopt(_sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
459  }
460  CloseSocket(tmpsock);
461  if(_sock < 0) throw std::runtime_error("Socket accept failed");
462  return _sock;
463  }
464  int Shutdown()
465  {
466 #if !defined(WIN32) || defined(__CYGWIN__)
467  if(_portno < 0) unlink(_sockname.c_str());
468 #endif
471  return 0;
472  }
473 };
474 
475 #endif
GmshSocket::GMSH_VERTEX_ARRAY
@ GMSH_VERTEX_ARRAY
Definition: GmshSocket.h:74
GmshSocket::SendMessage
void SendMessage(int type, int length, const void *msg)
Definition: GmshSocket.h:186
GmshSocket::_sent
unsigned long int _sent
Definition: GmshSocket.h:102
GmshSocket::GMSH_OPTION_4
@ GMSH_OPTION_4
Definition: GmshSocket.h:92
GmshSocket::MessageType
MessageType
Definition: GmshSocket.h:65
GmshSocket::_sock
int _sock
Definition: GmshSocket.h:98
GmshSocket::Warning
void Warning(const char *str)
Definition: GmshSocket.h:199
GmshSocket::ReceiveString
int ReceiveString(int len, char *str)
Definition: GmshSocket.h:235
GmshSocket::ReceiveHeader
int ReceiveHeader(int *type, int *len, int *swap)
Definition: GmshSocket.h:212
GmshSocket::GmshSocket
GmshSocket()
Definition: GmshSocket.h:156
GmshSocket::SpeedTest
void SpeedTest(const char *str)
Definition: GmshSocket.h:205
GmshSocket::~GmshSocket
~GmshSocket()
Definition: GmshSocket.h:163
c
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
Definition: discreteFrechetDistance.cpp:15
GmshSocket::GMSH_PARAMETER_QUERY_ALL
@ GMSH_PARAMETER_QUERY_ALL
Definition: GmshSocket.h:77
GmshSocket::ParseString
void ParseString(const char *str)
Definition: GmshSocket.h:204
GmshSocket::GMSH_PARSE_STRING
@ GMSH_PARSE_STRING
Definition: GmshSocket.h:73
GmshSocket::_sendData
int _sendData(const void *buffer, int bytes)
Definition: GmshSocket.h:104
GmshServer::~GmshServer
virtual ~GmshServer()
Definition: GmshSocket.h:344
GmshSocket::CloseSocket
void CloseSocket(int s)
Definition: GmshSocket.h:243
GmshSocket::GMSH_PARAMETER
@ GMSH_PARAMETER
Definition: GmshSocket.h:75
GmshSocket::MergeFile
void MergeFile(const char *str)
Definition: GmshSocket.h:202
GmshSocket::GMSH_SPEED_TEST
@ GMSH_SPEED_TEST
Definition: GmshSocket.h:82
GmshServer::GmshServer
GmshServer()
Definition: GmshSocket.h:343
GmshSocket::ReceiveMessage
int ReceiveMessage(int len, void *buffer)
Definition: GmshSocket.h:229
GmshSocket::Option
void Option(int num, const char *str)
Definition: GmshSocket.h:206
GmshSocket::_receiveData
int _receiveData(void *buffer, int bytes)
Definition: GmshSocket.h:119
GmshServer
Definition: GmshSocket.h:338
GmshSocket::GMSH_CONNECT
@ GMSH_CONNECT
Definition: GmshSocket.h:79
GmshSocket::ReceivedBytes
unsigned long int ReceivedBytes()
Definition: GmshSocket.h:258
GmshServer::NonBlockingWait
virtual int NonBlockingWait(double waitint, double timeout, int socket=-1)=0
GmshSocket::GMSH_OPTION_2
@ GMSH_OPTION_2
Definition: GmshSocket.h:90
GmshClient
Definition: GmshSocket.h:261
GmshSocket::GMSH_PARAMETER_QUERY_END
@ GMSH_PARAMETER_QUERY_END
Definition: GmshSocket.h:78
GmshSocket::OpenProject
void OpenProject(const char *str)
Definition: GmshSocket.h:203
GmshSocket::GMSH_CLIENT_CHANGED
@ GMSH_CLIENT_CHANGED
Definition: GmshSocket.h:86
GmshSocket::_sockname
std::string _sockname
Definition: GmshSocket.h:100
GmshSocket::ShutdownSocket
void ShutdownSocket(int s)
Definition: GmshSocket.h:251
GmshClient::Disconnect
void Disconnect()
Definition: GmshSocket.h:335
swap
void swap(double &a, double &b)
Definition: meshTriangulation.cpp:27
GmshSocket::GMSH_PROGRESS
@ GMSH_PROGRESS
Definition: GmshSocket.h:71
GmshSocket::SentBytes
unsigned long int SentBytes()
Definition: GmshSocket.h:257
GmshSocket::_sleep
void _sleep(int ms)
Definition: GmshSocket.h:146
GmshServer::Shutdown
int Shutdown()
Definition: GmshSocket.h:464
GmshSocket::GMSH_ERROR
@ GMSH_ERROR
Definition: GmshSocket.h:70
GmshClient::Connect
int Connect(const char *sockname)
Definition: GmshSocket.h:265
GmshSocket::Info
void Info(const char *str)
Definition: GmshSocket.h:198
GmshSocket::_swapBytes
void _swapBytes(char *array, int size, int n)
Definition: GmshSocket.h:135
GmshSocket::GMSH_STOP
@ GMSH_STOP
Definition: GmshSocket.h:67
GmshSocket
Definition: GmshSocket.h:59
GmshSocket::GMSH_START
@ GMSH_START
Definition: GmshSocket.h:66
GmshSocket::GMSH_WARNING
@ GMSH_WARNING
Definition: GmshSocket.h:69
GmshSocket::Select
int Select(int seconds, int microseconds, int socket=-1)
Definition: GmshSocket.h:173
GmshSocket::GMSH_INFO
@ GMSH_INFO
Definition: GmshSocket.h:68
GmshSocket::GMSH_PARAMETER_CLEAR
@ GMSH_PARAMETER_CLEAR
Definition: GmshSocket.h:83
GmshSocket::GMSH_OLPARSE
@ GMSH_OLPARSE
Definition: GmshSocket.h:80
GmshSocket::Progress
void Progress(const char *str)
Definition: GmshSocket.h:201
GmshSocket::GMSH_PARAMETER_UPDATE
@ GMSH_PARAMETER_UPDATE
Definition: GmshSocket.h:84
GmshSocket::GMSH_OPTION_3
@ GMSH_OPTION_3
Definition: GmshSocket.h:91
length
double length(Quaternion &q)
Definition: Camera.cpp:346
GmshSocket::GMSH_PARAMETER_NOT_FOUND
@ GMSH_PARAMETER_NOT_FOUND
Definition: GmshSocket.h:81
GmshSocket::GMSH_OPTION_5
@ GMSH_OPTION_5
Definition: GmshSocket.h:93
GmshSocket::GMSH_OPEN_PROJECT
@ GMSH_OPEN_PROJECT
Definition: GmshSocket.h:85
GmshSocket::GMSH_PARAMETER_QUERY_WITHOUT_CHOICES
@ GMSH_PARAMETER_QUERY_WITHOUT_CHOICES
Definition: GmshSocket.h:88
GmshServer::NonBlockingSystemCall
virtual int NonBlockingSystemCall(const std::string &exe, const std::string &args)=0
GmshClient::Start
void Start()
Definition: GmshSocket.h:324
GmshServer::_portno
int _portno
Definition: GmshSocket.h:340
GmshSocket::GMSH_OPTION_1
@ GMSH_OPTION_1
Definition: GmshSocket.h:89
picojson::array
value::array array
Definition: picojson.h:194
GmshSocket::_received
unsigned long int _received
Definition: GmshSocket.h:102
GmshClient::GmshClient
GmshClient()
Definition: GmshSocket.h:263
GmshClient::Stop
void Stop()
Definition: GmshSocket.h:334
GmshClient::~GmshClient
~GmshClient()
Definition: GmshSocket.h:264
GmshServer::Start
int Start(const std::string &exe, const std::string &args, const std::string &sockname, double timeout)
Definition: GmshSocket.h:351
GmshSocket::GMSH_MERGE_FILE
@ GMSH_MERGE_FILE
Definition: GmshSocket.h:72
GmshSocket::GMSH_PARAMETER_WITHOUT_CHOICES
@ GMSH_PARAMETER_WITHOUT_CHOICES
Definition: GmshSocket.h:87
GmshSocket::GMSH_PARAMETER_QUERY
@ GMSH_PARAMETER_QUERY
Definition: GmshSocket.h:76
GmshSocket::Error
void Error(const char *str)
Definition: GmshSocket.h:200
GmshSocket::SendString
void SendString(int type, const char *str)
Definition: GmshSocket.h:194