Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » SSH package for U++ (A feature-rich ilbssh2 wrapper for Ultimate++)
Re: SSH package for U++ [message #50146 is a reply to message #50145] Wed, 08 August 2018 10:56 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, I have already did SFtpHandle* -> SFtpHandle with no ill effects.

Now I am trying to deal with "Cmd" and async operations.

I undestand the appeal, but I have to say that the result is sort of confusing. E.g. I have implemented

int Get(SFtpObject* obj, void* buffer, int size);

but it is clearly incompatible with this sort of async operations. All those NULL handles, implicit results etc make me uneasy.

Meanwhile, I have started to checking coming coroutines support (probably C++20) - on the first look, these look like "queue done right".

So I guess for now, I will try to pretend that those complex Cmd / ComplexCmd "nonblocking" operations are not there, probably putting assert to make that sure for methods like "Get" and hope to do all that right with co_wait / co_return in the future.

In related news, I have also fixed GetWaitEvents

dword Ssh::GetWaitEvents()
{
	ssh->events = 0;
	if(ssh->socket && ssh->session)
		ssh->events = libssh2_session_block_directions(ssh->session);
	return !!(ssh->events & LIBSSH2_SESSION_BLOCK_INBOUND) * WAIT_READ +
	       !!(ssh->events & LIBSSH2_SESSION_BLOCK_OUTBOUND) * WAIT_WRITE;
}



I am also thinking that perhaps SFtp should be (derived from) SshSession. I think it is unlikely that sharing SshSession for several protocols is all that important.

[Updated on: Wed, 08 August 2018 11:03]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: WebSockets client in javascript connected to an U++ server sending binary messages
Next Topic: TURTLE high cpu usage, potential security flaw, and client handling problem
Goto Forum:
  


Current Time: Sat May 04 07:15:10 CEST 2024

Total time taken to generate the page: 0.02947 seconds