Add api to wyebrun

This commit is contained in:
jun7 2018-05-20 10:19:51 +09:00
parent 6496a9ba6e
commit 5c0562e6e8
2 changed files with 6 additions and 0 deletions

View File

@ -360,6 +360,10 @@ char *wyebreq(char *exe, char *req)
{ {
return request(exe, CSdata, pid(), req); return request(exe, CSdata, pid(), req);
} }
void wyebsend(char *exe, char *req)
{
request(exe, CSdata, NULL, req);
}
void wyebuntil(char *exe, int sec) void wyebuntil(char *exe, int sec)
{ {
if (!lastsec) if (!lastsec)

View File

@ -27,6 +27,7 @@ along with wyebrun. If not, see <http://www.gnu.org/licenses/>.
//client //client
//wyebrun spawns the exe if wyebsend failes //wyebrun spawns the exe if wyebsend failes
char *wyebreq( char *exe, char *req); char *wyebreq( char *exe, char *req);
void wyebsend( char *exe, char *req);
void wyebuntil( char *exe, int sec); //keep alive. default is 10s void wyebuntil( char *exe, int sec); //keep alive. default is 10s
//loop the wyebuntil. to stop, use g_source_remove //loop the wyebuntil. to stop, use g_source_remove
guint wyebloop( char *exe, int sec, int loopsec); guint wyebloop( char *exe, int sec, int loopsec);
@ -44,4 +45,5 @@ void wyebwatch(char *exe, char *caller, wyebdataf func);
//the caller is used to send the res meaning we are ready. //the caller is used to send the res meaning we are ready.
//3 sec left or client will die //3 sec left or client will die
#endif //_WYEBRUN_H #endif //_WYEBRUN_H