Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
0c4c65d7
Commit
0c4c65d7
authored
Aug 24, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wxServer was a confusing define, since it is also a wxWidgets class, do not use it
parent
96771ccc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
21 deletions
+11
-21
eda_dde.cpp
common/eda_dde.cpp
+7
-8
eda_dde.h
include/eda_dde.h
+4
-13
No files found.
common/eda_dde.cpp
View file @
0c4c65d7
...
...
@@ -6,19 +6,17 @@
#include <eda_dde.h>
#include <wxstruct.h>
#include <id.h>
#include <common.h>
#include <macros.h>
wxString
HOSTNAME
(
wxT
(
"localhost"
)
);
static
const
wxString
HOSTNAME
(
wxT
(
"localhost"
)
);
// buffer for read and write data in socket connections
#define IPC_BUF_SIZE 4096
static
char
client_ipc_buffer
[
IPC_BUF_SIZE
];
static
wxServer
*
server
;
static
wxS
ocketS
erver
*
server
;
void
(
*
RemoteFct
)(
const
char
*
cmd
);
...
...
@@ -35,17 +33,18 @@ void SetupServerFunction( void (*remotefct)(const char* remotecmd) )
/* Function to initialize a server socket
*/
WinEDA_
Server
*
CreateServer
(
wxWindow
*
window
,
int
service
,
bool
local
)
wxSocket
Server
*
CreateServer
(
wxWindow
*
window
,
int
service
,
bool
local
)
{
wxIPV4address
addr
;
//
Create a new serv
er
//
Set the port numb
er
addr
.
Service
(
service
);
// Listen on localhost only if requested
if
(
local
)
addr
.
Hostname
(
HOSTNAME
);
server
=
new
wxServer
(
addr
);
server
=
new
wxS
ocketS
erver
(
addr
);
if
(
server
)
{
...
...
include/eda_dde.h
View file @
0c4c65d7
...
...
@@ -3,15 +3,11 @@
* @brief DDE server & client.
*/
#ifndef
_
EDA_DDE_H_
#define
_
EDA_DDE_H_
#ifndef EDA_DDE_H_
#define EDA_DDE_H_
#include <wx/socket.h>
#define wxServer wxSocketServer
#define wxClient wxSocketClient
#define WinEDA_Server wxSocketServer
// TCP/IP ports used by Pcbnew and Eeschema respectively.
...
...
@@ -25,13 +21,8 @@
#define MSG_TO_PCB KICAD_PCB_PORT_SERVICE_NUMBER
#define MSG_TO_SCH KICAD_SCH_PORT_SERVICE_NUMBER
/********************/
/* autres fonctions */
/********************/
WinEDA_Server
*
CreateServer
(
wxWindow
*
window
,
int
port
,
bool
local
=
true
);
wxSocketServer
*
CreateServer
(
wxWindow
*
window
,
int
port
,
bool
local
=
true
);
bool
SendCommand
(
int
port
,
const
char
*
cmdline
);
void
SetupServerFunction
(
void
(
*
remotefct
)
(
const
char
*
remotecmd
)
);
#endif //
_
EDA_DDE_H_
#endif // EDA_DDE_H_
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment