-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework EndpointInfo and ConnectionInfo in MATLAB (#3209)
- Loading branch information
1 parent
52a0912
commit ade64da
Showing
18 changed files
with
268 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,21 @@ | ||
classdef ConnectionInfo < Ice.ConnectionInfo | ||
classdef (Sealed) ConnectionInfo < Ice.ConnectionInfo | ||
% ConnectionInfo Summary of ConnectionInfo | ||
% | ||
% Provides access to the connection detaisl of an SSL connection. | ||
% Provides access to the connection details of an SSL connection. | ||
% | ||
% ConnectionInfo Properties: | ||
% peerCertificate - The peer certificate. | ||
|
||
% Copyright (c) ZeroC, Inc. All rights reserved. | ||
|
||
methods | ||
function obj = ConnectionInfo(underlying, incoming, adapterName, connectionId, ... | ||
peerCertificate) | ||
if nargin == 0 | ||
underlying = []; | ||
incoming = false; | ||
adapterName = ''; | ||
connectionId = ''; | ||
peerCertificate = ''; | ||
end | ||
[email protected](underlying, incoming, adapterName, connectionId); | ||
function obj = ConnectionInfo(underlying, peerCertificate) | ||
assert(nargin == 2, 'Invalid number of arguments'); | ||
[email protected](underlying); | ||
obj.peerCertificate = peerCertificate; | ||
end | ||
end | ||
properties(SetAccess=private) | ||
properties(SetAccess=immutable) | ||
% peerCertificate - The peer certificate. | ||
peerCertificate | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
classdef EndpointInfo < Ice.EndpointInfo | ||
classdef (Sealed) EndpointInfo < Ice.EndpointInfo | ||
% TCPEndpointInfo Summary of TCPEndpointInfo | ||
% | ||
% Provides access to a TCP endpoint information. | ||
|
||
% Copyright (c) ZeroC, Inc. All rights reserved. | ||
|
||
methods | ||
function obj = EndpointInfo(type, secure, underlying, timeout, compress) | ||
if nargin == 0 | ||
underlying = []; | ||
timeout = 0; | ||
compress = false; | ||
end | ||
[email protected](type, false, secure, underlying, timeout, compress); | ||
function obj = EndpointInfo(underlying) | ||
assert(nargin == 1, 'Invalid number of arguments'); | ||
[email protected](underlying); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,27 +11,7 @@ | |
|
||
% Copyright (c) ZeroC, Inc. All rights reserved. | ||
|
||
methods | ||
function obj = IPConnectionInfo(underlying, incoming, adapterName, connectionId, localAddress, localPort, ... | ||
remoteAddress, remotePort) | ||
if nargin == 0 | ||
underlying = []; | ||
incoming = false; | ||
adapterName = ''; | ||
connectionId = ''; | ||
localAddress = ''; | ||
localPort = 0; | ||
remoteAddress = ''; | ||
remotePort = 0; | ||
end | ||
[email protected](underlying, incoming, adapterName, connectionId); | ||
obj.localAddress = localAddress; | ||
obj.localPort = localPort; | ||
obj.remoteAddress = remoteAddress; | ||
obj.remotePort = remotePort; | ||
end | ||
end | ||
properties(SetAccess=private) | ||
properties(SetAccess=immutable) | ||
% localAddress - The local address. | ||
localAddress char | ||
|
||
|
@@ -44,4 +24,14 @@ | |
% remotePort - The remote port. | ||
remotePort int32 | ||
end | ||
methods(Access=protected) | ||
function obj = IPConnectionInfo(connectionId, localAddress, localPort, remoteAddress, remotePort) | ||
assert(nargin == 5, 'Invalid number of arguments'); | ||
[email protected]([], connectionId); | ||
obj.localAddress = localAddress; | ||
obj.localPort = localPort; | ||
obj.remoteAddress = remoteAddress; | ||
obj.remotePort = remotePort; | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,23 +10,7 @@ | |
|
||
% Copyright (c) ZeroC, Inc. All rights reserved. | ||
|
||
methods | ||
function obj = IPEndpointInfo(type, datagram, secure, underlying, timeout, compress, host, port, sourceAddress) | ||
if nargin == 3 | ||
underlying = []; | ||
timeout = 0; | ||
compress = false; | ||
host = ''; | ||
port = 0; | ||
sourceAddress = ''; | ||
end | ||
[email protected](type, datagram, secure, underlying, timeout, compress); | ||
obj.host = host; | ||
obj.port = port; | ||
obj.sourceAddress = sourceAddress; | ||
end | ||
end | ||
properties(SetAccess=private) | ||
properties(SetAccess=immutable) | ||
% host - The host or address configured with the endpoint. | ||
host char | ||
|
||
|
@@ -36,4 +20,13 @@ | |
% sourceAddress - The source IP address. | ||
sourceAddress char | ||
end | ||
methods(Access=protected) | ||
function obj = IPEndpointInfo(timeout, compress, host, port, sourceAddress) | ||
assert(nargin == 5, 'Invalid number of arguments'); | ||
[email protected]([], timeout, compress); | ||
obj.host = host; | ||
obj.port = port; | ||
obj.sourceAddress = sourceAddress; | ||
end | ||
end | ||
end |
Oops, something went wrong.