#include <wx/process.h>
#include <wx/txtstrm.h>
...
wxProcess *process = wxProcess::Open(wxT("nc localhost 3000"));
if ( !process ) {
wxLogError(wxT("Failed to launch the command."));
return false;
}
wxTextOutputStream out(*(process->GetOutputStream()));
out << "hi there" << endl;
process->Kill(process->GetPid(), wxSIGQUIT);