private IodineObject connected(VirtualMachine vm, IodineObject self, IodineObject[] args) { try { var result = !((Socket.Poll(1000, SelectMode.SelectRead) && (Socket.Available == 0)) || !Socket.Connected); return(IodineBool.Create(result)); } catch { return(IodineBool.False); } }
public IodineObject ReadBool() { return(IodineBool.Create(binaryReader.ReadBoolean())); }
private void WriteBool(IodineBool boolean) { binaryWriter.Write((byte)DataType.BoolObject); binaryWriter.Write(boolean.Value); }
public override object ConvertFrom(TypeRegistry registry, IodineObject obj) { IodineBool boolean = obj as IodineBool; return(boolean.Value); }