tg_cli works under windows
GitOrigin-RevId: 30810ab2d69390c5ec842cfffd686bfa2043ef59
This commit is contained in:
parent
bf15a5ac12
commit
5923d6d41b
@ -644,7 +644,7 @@ class CliClient final : public Actor {
|
|||||||
#ifdef USE_READLINE
|
#ifdef USE_READLINE
|
||||||
FileFd stdin_;
|
FileFd stdin_;
|
||||||
#else
|
#else
|
||||||
using StreamConnection = BufferedFd<Fd>;
|
using StreamConnection = BufferedFd<FileFd>;
|
||||||
StreamConnection stdin_;
|
StreamConnection stdin_;
|
||||||
#endif
|
#endif
|
||||||
static CliClient *instance_;
|
static CliClient *instance_;
|
||||||
@ -752,7 +752,7 @@ class CliClient final : public Actor {
|
|||||||
explicit StdinReader(ActorShared<CliClient> parent) : parent_(std::move(parent)) {
|
explicit StdinReader(ActorShared<CliClient> parent) : parent_(std::move(parent)) {
|
||||||
}
|
}
|
||||||
void start_up() override {
|
void start_up() override {
|
||||||
stdin_ = &Fd::Stdin();
|
stdin_ = &Stdin();
|
||||||
set_timeout_in(0.001);
|
set_timeout_in(0.001);
|
||||||
}
|
}
|
||||||
void timeout_expired() override {
|
void timeout_expired() override {
|
||||||
@ -769,7 +769,7 @@ class CliClient final : public Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Fd *stdin_ = nullptr;
|
FileFd *stdin_ = nullptr;
|
||||||
string data_;
|
string data_;
|
||||||
ActorShared<CliClient> parent_;
|
ActorShared<CliClient> parent_;
|
||||||
void process() {
|
void process() {
|
||||||
|
Loading…
Reference in New Issue
Block a user