Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Respect timeout with SSL#8899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
d-a-v wants to merge25 commits intoesp8266:master
base:master
Choose a base branch
Loading
fromd-a-v:ssltimeout
Open

Conversation

@d-a-v
Copy link
Collaborator

@d-a-vd-a-v commentedMar 28, 2023
edited
Loading

Comment on lines 280 to 297
intconnect(IPAddress ip,uint16_t port)override {uto();return _ctx->connect(ip, port); }
intconnect(const String& host,uint16_t port)override {uto();return _ctx->connect(host, port); }
intconnect(constchar* name,uint16_t port)override {uto();return _ctx->connect(name, port); }

uint8_tconnected()override {uto();return _ctx->connected(); }
size_twrite(constuint8_t *buf,size_t size)override {uto();return _ctx->write(buf, size); }
size_twrite_P(PGM_P buf,size_t size)override {uto();return _ctx->write_P(buf, size); }
size_twrite(constchar *buf) {uto();returnwrite((constuint8_t*)buf,strlen(buf)); }
size_twrite_P(constchar *buf) {uto();returnwrite_P((PGM_P)buf,strlen_P(buf)); }
size_twrite(Stream& stream)/* Note this is not virtual*/ {uto();return _ctx->write(stream); }
intread(uint8_t *buf,size_t size)override {uto();return _ctx->read(buf, size); }
intavailable()override {uto();return _ctx->available(); }
intavailableForWrite()override {uto();return _ctx->availableForWrite(); }
intread()override {uto();return _ctx->read(); }
intpeek()override {uto();return _ctx->peek(); }
size_tpeekBytes(uint8_t *buffer,size_t length)override {uto();return _ctx->peekBytes(buffer, length); }
boolflush(unsignedint maxWaitMs) {uto();return _ctx->flush(maxWaitMs); }
boolstop(unsignedint maxWaitMs) {uto();return _ctx->stop(maxWaitMs); }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

d-a-v/Arduino@ssltimeout...mcspr:esp8266-Arduino:ssltimeout ?

reiterating on the matrix discussion - no need to touch _timeout when not necessary, ctx class can have its own timeout state
implementing method override should fix the after-connect setting of timeout as well

Copy link
CollaboratorAuthor

@d-a-vd-a-vApr 1, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

_ctx is not accessible from user side.
sslclient.setTimeout() can be called from the Stream class (Stream& s = sslclient; s.setTimeout(1234);)
Stream::setTimeout is not virtual and I'm not sure that modifying Arduino API is not going to be a breaking change but you tell me.
Stream::_timeout updates from client side are ignored until forwarded to the context_ctx.
Considering that user can update this timeout anytime, I placed these many calls where_timeout is used.

edit This commit revertsthis one where there was an unwanted pointer of the client stream inside the context to help reaching user timeout.

edit2 nowStream::setTimeout() is virtual

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mcsprmcsprmcspr left review comments

Assignees

No one assigned

Labels

alphaincluded in alpha release

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Respect set timeout in WiFiClientSecureCtx

2 participants

@d-a-v@mcspr

[8]ページ先頭

©2009-2025 Movatter.jp